help with iteration
help with iteration
(OP)
Hi.
I have a function I have to iterate probably over 200 times and I just cant make it work. There is one iterating variable (steel temperature O.a.t) and 1 other variable (0.g.t) follows a temperature function. Delta 0.g.t is the temperature difference between 30 sec. steps from the temp. function. The step (delta t) can only be 30 seconds.
So how can I import values of that temp. function to the iterating function and most importantly how to iterate that function? I want to find out when the steel temperature reaches 500C.
Theres the file attached and an example how I want it to be iterated.
Please help.
I have a function I have to iterate probably over 200 times and I just cant make it work. There is one iterating variable (steel temperature O.a.t) and 1 other variable (0.g.t) follows a temperature function. Delta 0.g.t is the temperature difference between 30 sec. steps from the temp. function. The step (delta t) can only be 30 seconds.
So how can I import values of that temp. function to the iterating function and most importantly how to iterate that function? I want to find out when the steel temperature reaches 500C.
Theres the file attached and an example how I want it to be iterated.
Please help.






RE: help with iteration
You can likely use either a FOR loop or a WHILE loop.
With the FOR loop you evaluate the first value and then run all increments and the evaluation inside the loop accounts for evaluating from the previous value till the loop ends (you may calculate the first value inside the FOR loop with the proper formulation making distinction between step 1 and all following)
In the WHILE loop the procedure is similar, you calculate a evaluate a first value then WHILE the extant value of the data is less than the target you reenter the calculation that, again, accounts for increasing from the previous value.
At the end of the program, you return the value to the function.
The best advice is to look in the manual of Mathcad for the use of programming and in particular looking for examples of the FOR and WHILE loops.
RE: help with iteration
RE: help with iteration
I had to get it done so I switched to excel. Problem solved :)
Ill look into mathcad programming another day.
RE: help with iteration
TTFN
FAQ731-376: Eng-Tips.com Forum Policies