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

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

14-Alexandrite

## Summation of the table values

Hello!

How can I sum all the values given in a table by using the Summation operator? Each row is n=1, n=2 and so on.

Please, take a look at the attached file.

1 ACCEPTED SOLUTION

Accepted Solutions
24-Ruby V
(To:Sergey)

Its not clear to me what you are looking for or what result you expect

Is it something like this:

or do you expect a vector of values as result?

You should also know that the first index of a vector is by default 0, not 1. This behaviour can be changed by setting ORIGIN to a value other than zero.

What you calculated simply was

Note that du.1*du.1 is a scalar vector product!

5 REPLIES 5
24-Ruby V
(To:Sergey)

Its not clear to me what you are looking for or what result you expect

Is it something like this:

or do you expect a vector of values as result?

You should also know that the first index of a vector is by default 0, not 1. This behaviour can be changed by setting ORIGIN to a value other than zero.

What you calculated simply was

Note that du.1*du.1 is a scalar vector product!

14-Alexandrite
(To:Werner_E)

Hello.

I was expecting the first result you listed.

Thank you.

14-Alexandrite
(To:Werner_E)

Did you compute this in Prime or in Mathcad 15?

I do not get the right result in Prime (should be 12)

24-Ruby V
(To:Sergey)

@Sergey wrote:

Did you compute this in Prime or in Mathcad 15?

No, it was done in Prime.

leave away the "n=1" and upper limit "6". Leave the placeholders simply empty.

du.1^2 is squaring a vector, Actually this is an invalid operation and Prime could (should?) throw an error. Instead it applied implicit vectorization, doing the squaring element by element and the result is a vector. The sum (without lower and upper limit) simply sums up the elements of this vector.

What you wrote add this vector six times and the result again is a vector. To can use this running index from 1 to 6 but first you would have to set ORIGIN to 1 and then you would have to use a vector index du.1[n.

Doing it the way I showed is easier, though.

14-Alexandrite
(To:Werner_E)

Thanks a lot. A very usefull technique.

Announcements
Top Tags