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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

How to use summation operator in mathcad prime

Abhishek71992
6-Contributor

How to use summation operator in mathcad prime

Hi,

I am not able to use summation operator in Mathcad prime. Please find attached the mathcad file.

TIA

4 REPLIES 4

There are two kinds of subscripts:

  • literal subscripts ("cntrl -") that give you a variable name with a subscript, and
  • an index subscript ("[") that gives you a referenced element in a vector or array

You assigned literal subscripts, then attempted to address them as elements in vectors.

 

See attached, watch for highlighted expressions.

Thanks Fred

LucMeekes
23-Emerald III
(To:Abhishek71992)

You are using literal subscripts (Created with CTRL-_) instead of indexes (created with [ ).

So your Ei is undefined, and E is defined, but a scalar, not a vector. You cannot use the summation operator like that  on a scalar.

 

Success!

Luc

OK, I see that my first two concerns here

https://community.ptc.com/t5/PTC-Mathcad/How-to-sum-a-range-variable/m-p/683865/highlight/true#M191531

obviously were justified. Thanks to my crystal ball ;-).

 

As you were already told you have to use the vector/matrix index (either from the menu ribbon or via the shortcut [) to create a vector with indexed elements.

And you did not change the system variable ORIGIN. By default this variable is set to zero which means, that the first element of a vector has the index 0 (so you would have to sum from 0 up to 2). Setting ORIGIN to 1 (via the ribbon menu or simply like an ordinary variable at the top of the sheet) enables you to write the summation the same way as in your inserted pictures.

Werner_E_1-1598284405203.png

 

Another way (independent of the value of ORIGIN) to do the sum without a range variable (as shown in the other thread) and without a summation index is shown below. Because two vector elements (E and t^3) are multiplied, we have to use vectorization (The arrow over the expression) as otherwise Prime would calculate the scalar product of the two vectors.
Werner_E_0-1598284380312.png

 

The latter would be an ever shorter way to calculate that value without an explicit sum:

Werner_E_2-1598284551911.png

Nonetheless I wouldn't suggest doing so as its absolutely unclear and not universally usable.

 

 

Announcements

Top Tags