Skip to main content
15-Moonstone
Oct 6, 2021 10:51 AM UTC
Solved

Summation of the function

Hello!

 

I am trying to sum up all the values of the given function f(x) by using the summation operator. 

Variable "x" has assigned values in vector form. How do I proceed here?

 

Please, take a look at the attached file (Mathcad Prime 6).

 

Best regards,

Sergey 

o.svahnAnswer
12-Amethyst
Oct 6, 2021 11:37 AM UTC

You need  

osvahn_0-1633520213771.png

for it to be a vector !

kudos

Owe

17 replies

o.svahn12-AmethystAnswer
12-Amethyst
Oct 6, 2021 11:37 AM UTC

You need  

osvahn_0-1633520213771.png

for it to be a vector !

kudos

Owe

Translate
Sergey15-MoonstoneAuthor
15-Moonstone
Oct 6, 2021 11:46 AM UTC

Of course it is - I should have seen it.

Thanks a lot.

Translate
23-Emerald V
Oct 6, 2021 2:11 PM UTC

OK, you transpose the array x, which gives

LucMeekes_0-1633530300169.png

Then your summation gives:

LucMeekes_1-1633530327207.png

That is because j is not part of the argument of the summation. If you change the limits for j:

LucMeekes_2-1633530387800.png

or:

LucMeekes_3-1633530434036.png

Now if you sum these array values, you get 83, which is the sum of the values of the function results for each of the array elements in x.

To get that straight away, you can index the function inside the summation:

LucMeekes_4-1633530574198.png

Which is (most probably) what you were after.

Prime is pretty forgiving. Without requiring a transpose, this also works:

LucMeekes_0-1633529446024.png

Success!
Luc

Translate
Sergey15-MoonstoneAuthor
15-Moonstone
Oct 6, 2021 2:48 PM UTC

Thanks Luc.
But for the correctness sake it may be better to stick with the transpose operator 🙂

 

Sergey

 

 

Translate