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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

How to use summation operator in mathcad prime

5-Regular Member

How to use summation operator in mathcad prime


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



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

23-Emerald III

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.




OK, I see that my first two concerns here

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.



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.


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


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