## Programming an iterative loop

## Programming an iterative loop

(OP)

Hello everyone,

I am new in programming with Mathcad, as up to now I have only used it for simple calculations. I now want to solve an energy balance which needs to be solved iteratively. The error I get is not enough memory for this peration but I am guessing I am doing something wrong with arrays. Apart from that, I am also wondering whether my way of thinking is the wrong one for Mathcad, since I am trying to solve it in the same way I do it in Matlab.

I would really appreciate any help.

El.

I am new in programming with Mathcad, as up to now I have only used it for simple calculations. I now want to solve an energy balance which needs to be solved iteratively. The error I get is not enough memory for this peration but I am guessing I am doing something wrong with arrays. Apart from that, I am also wondering whether my way of thinking is the wrong one for Mathcad, since I am trying to solve it in the same way I do it in Matlab.

I would really appreciate any help.

El.

## RE: Programming an iterative loop

Your "while loop" counter needs to be inside the "while loop" syntax

i.e : t <-- t + 1

However from looking at your program I don't think it will work as intended.

Dave, Msc(Eng), AMIMechE

Graduate Mechanical Engineer

(3 Years left for Chartership!)

## RE: Programming an iterative loop

*You're getting a memory error...

Dave, Msc(Eng), AMIMechE

Graduate Mechanical Engineer

(3 Years left for Chartership!)

## RE: Programming an iterative loop

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers

## RE: Programming an iterative loop

## RE: Programming an iterative loop

Thank you very much for taking the time to have a look at my problem. I had tried to use the given/find way, however I couldn't make it work and I thought it could be because I am looking to find the solution as a function of time. I will try it again and see how it goes.

Thanks again,

El