Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
I am new to Mathcad and I am having a problem with programming a simple loop. In the attached mathcad sheet I want to calculate the value of (q) and then I want it to add to (s) and then re-calculate (q) for the new (s) value. However, I am unable to do this using the programming function as shown in the Mathcad sheet. It seems to give the same answer through the loop. Please help. Thank you.
just need to move the summing line inside the for loop.
Regards
Andy
Many thanks for the answer. It was very helpful. I got another question on how I could return the values of both s and q in the mathcad sheet. Thank you.
Ranjan Nadarajah wrote:
Many thanks for the answer. It was very helpful. I got another question on how I could return the values of both s and q in the mathcad sheet. Thank you.
Are you interested only in the last value of the iterations of both of them or do you need the whole "history"?
Said another way - do you want vectors for s and q or rather a single value (from the last iteration)?