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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Complex Summation Problem

ptc-4692696
1-Newbie

Complex Summation Problem

Everyone,

I am trying to set up a summation equation the that uses a combination of a current instance of a variable as well as the previous one. Anyone have any idea on how I would set this up?

equation.png

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions

Which version of Mathcad do you use?

I guess you are not aware of the fact that Mathcad has two different types of indices.

You seem to be using the so called literal index - typing v dot i (or v "Strg & dash" in Prime) to get it. This is only a name, only to look different as v1. Is has nothing to do with adressing vectors or matrices.

The matrix index we need here you get by typing v[i or you find it in the matrix palette, too.

Edited: I have seen from your other reply that you are using Prime. I attached the sheet in that format here: http://communities.ptc.com/message/201007#201007

View solution in original post

10 REPLIES 10

Please post a Mathcad sheet with your current attempts. You have better chances of somebody taking care of cour question that way, as it shows which version of Mathcad you intend to use and it saves us the redious retyping work.

In your pic the definition of R and N are missing. Or should phi be function of the two?

In your case you would first define a nd B, either calculate them or set them up as functions of R and N if they should remain unknown.

Then create the vector v. As Mathcad by default begins with index 0, I would switch you formulas by +1 (this will also affect the summation, of course). j is running from 0 to n-2, I guess, as the las v used in summation is v index n-1?

Now you can setup the formula for phi, either as a function of R and N or as a constant.

Thank you for the assistance. n, N and R are all calculated else where

I have attempted what you suggestec but I am still having difficulty with defining previous instance of the variable. I have attached my latest attempy

OK, I see you are using Prime.

I converted my sheet, which was made in Mathcad 15, and attach it here.

As already assumed, your problem were the different types of indices.

Would this help?

summation1.png

or this?

summation2.png

Both options look valid to me

I guess where I am struggling is that I can't seem to create j-1 subscript. Is there a trick for doing this? Every time I add the the minus sign it places it in as part of the equation.

Thanks

Which version of Mathcad do you use?

I guess you are not aware of the fact that Mathcad has two different types of indices.

You seem to be using the so called literal index - typing v dot i (or v "Strg & dash" in Prime) to get it. This is only a name, only to look different as v1. Is has nothing to do with adressing vectors or matrices.

The matrix index we need here you get by typing v[i or you find it in the matrix palette, too.

Edited: I have seen from your other reply that you are using Prime. I attached the sheet in that format here: http://communities.ptc.com/message/201007#201007

Depending on how many times you calculate phi I would recommend the first option.

Although the second looks neater it has to recalculate the 100 elements for v every time it is called, the first will only calculate them once & then it has a look-up table for the rest of the sheet.

Can be very much faster

Regards

Andy

Agreed, but as a later post of Mike revealed is n in the "magnitude" of 6 and it seems he needs to calculate phi only once for a given set of initial values. So I guess its up to his preference what to use. If he needs the values of a and B later or whats to see them, he will probably chose the first approach. The second would only make sense if phi is to be calculated more than once in the sheet or for a series of values of n or the like.

Thanks Werner,

I got this to work. The biggest problem was I wasn't working with the Matrix toolbar 🙂

Glad you sorted it out. You are not the first one to get confused over the two types of indices and I guess you will not be the last one. Especially as these two types are even harder to distinguish optically in Prime.

Top Tags