Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hello Experts
Need some help with iterating the solutions with time as a variant.
Castle
First, define your range variable, n.
---
Second, initialize all necessary elements of the vectors T, V and I.
Be careful to use the index operator and not name subscripting - they are quite different in function, if not appearance.
Also, be careful to use 0 (digit) instead of o (letter).
---
Third, Mathcad evalulates expression in their entirety from right to left, then top to bottom.
Consequently, when you evaluate Tₙ, Mathcad iterates over n but gets stuck when it tries to get the value of I₃, which it hasn't yet calculated.
The way round this is to evaluate T, V and I in parallel by embedding them in a vector (any array would be OK, eg a row-vector, but the standard column-vector is more readable for cases such as yours.
This way, Mathcad evaluates the whole of each vector at each iteration, so T, V and I are always in step.
Cheers,
Stuart
Thank you Stuart. It helped me a lot
I am exploring the possibility of using the “For loop” statements to get the calculations to work