goto in Pascal to Matlab

January 29, 2010 at 21:05:42
Specs: Macintosh
Does anyone know how to convert this program from
pascal to matlab? The goto statement is really
confusing me. I just don't understand what the
actually flow is because of it. I would really
appreciate it.

Thanks, Tina

Bhigh:= 1.5E+11;
Blow := 1.5E+2;
B := (Bhigh + Blow)/2.0;
w[1] := Ts; {Surface Temperature}
w[2] := (Ts-T0)/(d1*d2) + L; {Surface
Temperature Slope}
y := 0.0;
If w[1] > 1.0 then begin
Blow := B;
goto 100;
If w[2] < 0.0 then begin
Bhigh := B;
goto 100;

Runge( Equations0, 2, 0.01, y, w );
until Bhigh-Blow < 0.00000005;

See More: goto in Pascal to Matlab

Report •

January 30, 2010 at 01:49:43
You might want to repost in the programming forum. I don't remember enough of either to help. But it doesn't look like the program is complete. Ts, T0, D1, D2 and L are undefined (unless that's just part of the program) and Y is zero

You're not really green until you're soylent green.

Report •

January 30, 2010 at 14:39:17
the GOTO is to recalculate the results with the changed
parameters. It doing an approximation to seek the final value.

Report •

Related Solutions

Ask Question