cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Sum of array elements

lucaspaiva96
4-Participant

Sum of array elements

Hello good people

 

Capturar.PNG
Why mathcad says that v isn't a vector?

ACCEPTED SOLUTION

Accepted Solutions

Hi

Sorry forgot to say you need to define i as well.

Capture.JPG

View solution in original post

5 REPLIES 5

Hi,

 

"v" needs to be a column vector for the index to work.  To index into a row vector the index needs to be "0,i" or "1,i" depending how ORIGIN is set.

Hi

Sorry forgot to say you need to define i as well.

Capture.JPG

That's it. Vectors are still matrices after all. To me it was natural write V(i) instead of V(0,i) , but I got it now. Maybe this can be a suggestion for future updates, just to clean up some notation.
Thanks for the help!

Not sure if you know that you don't need to fill the place holders for the sum if you want to sum up all elements. This will work for a column- and a row-vector alike.

If you really just want to sum a specific range of elements I would prefer the method Terry had already shown. Just for fun here are a few more you could use as well

B.png

lucaspaiva96
4-Participant
(To:Werner_E)

Thanks for the tips, it will be helpful!

Announcements

Top Tags