Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock 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
Mar 3, 2008
18
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.
 
Replies continue below

Recommended for you

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