Skip to main content
1-Visitor
April 28, 2018
Solved

Sum of array elements

  • April 28, 2018
  • 3 replies
  • 6746 views

Hello good people

 

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

Best answer by terryhendicott

Hi

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

Capture.JPG

3 replies

21-Topaz II
April 28, 2018

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.

21-Topaz II
April 28, 2018

Hi

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

Capture.JPG

1-Visitor
April 28, 2018

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!

25-Diamond I
April 28, 2018

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

1-Visitor
April 28, 2018

Thanks for the tips, it will be helpful!