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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Iteration of solve block

FC_10037391
8-Gravel

Iteration of solve block

Hello Experts

Need some help with iterating the solutions with time as a variant. 

Castle 

2 REPLIES 2

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

Top Tags