Skip to main content
10-Marble
September 28, 2024
Solved

Summation Operator

  • September 28, 2024
  • 2 replies
  • 2644 views

HI,

Could someone explain to me how to calculate the summation operator? I have attached a picture where you can see my formula. If I understand correctly, my condition formula should work like this: 0.1 + 0.2 + 0.3 + 0.4 + 0.5 = 1.5. However, Mathcad only gives 0.1. What am I doing wrong?

Screenshot 2024-09.-28. at 18.54.14.png

Best answer by StuartBruff

Ignore my previous suggestion.  While on my back home, I had a "Doh!" moment.  I'd temporarily forgotten that the Summation Operator automatically steps by 1.   I would suggest that the j specification needs to include the step value, but I can't figure out how to include it.  Hopefully, somebody will be along to say how it can be done.

 

In the meantime, however ... 

 

2024 09 28 C.png

 

Stuart

2 replies

23-Emerald V
September 28, 2024

I’m not at my Mathcad at the moment, but try deleting the evaluation operator (= sign) after your expression and then evaluating Urms_new separately.

 

Stuart

23-Emerald V
September 28, 2024

Ignore my previous suggestion.  While on my back home, I had a "Doh!" moment.  I'd temporarily forgotten that the Summation Operator automatically steps by 1.   I would suggest that the j specification needs to include the step value, but I can't figure out how to include it.  Hopefully, somebody will be along to say how it can be done.

 

In the meantime, however ... 

 

2024 09 28 C.png

 

Stuart

10-Marble
September 28, 2024

thank you very much

By the same token, do you know how to get the number of rows from the matrix t? I tried using the rows(t) command, but it doesn't work, and I can't find another way

SZ_11156868_1-1727558183970.png

 

23-Emerald V
September 28, 2024

t is a range variable.  A range variable holds a range definition (range operator with values).  A range variable is effectively a promise to generate the specified numbers one at a time when the rv appears in an evaluation (=) or the right hand side of a definition ().  

 

It is NOT a vector.  Range variables and vectors have been confusing new users since time immemorial precisely because they look the same.

 

2024 09 28 G.png

 

Note that you need to be careful using Method.  Because Mathcad, like most maths apps, uses (64-bit) floating point arithmetic, you can have small internal differences from the exact decimal representation of a number.  So, scaling might not give the desired exact multiples of a number. It is sometimes best to use a rounding function (eg, round!) to avoid potential issues).

 

There are other methods of converting, and I'm confident somebody else will be along to show them (I always use vec and have it in my default template, so I don't need to rewrite it every time or copy/paste it).

 

Stuart