×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

help with iteration

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.

RE: help with iteration

Quite likely in Mathcad this is best done as a program block in which at the left of the equal sign you have what you are looking for and to the right a program. You use the programming tools in Mathcad.

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

I wasn't able to pull up the file you posted but you might be able to get a solution using the solver function in Excel.

RE: help with iteration

(OP)
Thank you for the quick reply.

I had to get it done so I switched to excel. Problem solved :)

Ill look into mathcad programming another day.

RE: help with iteration

If you downsave the file format, someone might be able to open it. Note that Mathcad has certain constructs that allow for "iteration" using implied loops, which include Given-Find, as well indexed "x[i" formulations.

TTFN
FAQ731-376: Eng-Tips.com Forum Policies

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources