Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add the values in an array

Status
Not open for further replies.

gbuell

Structural
Joined
Mar 3, 2008
Messages
18
Location
US
I have a 2x9 array and I want to have Mathcad 14 sum up all the elements. I've gone through the different types of summations in Mathcad and I haven't gotten any of them to work. I did manage to get what I want by turning each column of the matrix into a vector using the column command (M<> in the matrix toolbar) and then adding up each vector sum(ctrl-4). But it seems like this method shouldn't be necessary.
 
That's great, I didn't know about the vec function, that's exactly what I wanted.
 
Please note that the vec function is not built-in; I wrote it because I several needs for it. It is defined within the Vector Support Function area (or, at least that's where I normally define it!).
 
a simple and obvious solution that seems to work is sigma over i sigma over j M sub i,j

Cheers

Greg Locock

SIG:Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top