HP Forums

Full Version: 1st program with problems "Euler Method"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
whats wrong with this?
Code:

EXPORT eulerm(funct,X0,Y0,ch,times)
BEGIN
LOCAL a, s,check,x,y,myfunct;
myfunct:=EXPR(funct);
RETURN(myfunct(x,y));
MAKEMAT(0,times,2)▶s;
check=0;
FOR a FROM 0 TO times DO
IF check==0 THEN
s(a,0):=X0;
s(a,1):=Y0;
check:=1;
ELSE
s(a,0):=s(a-1,0)+ch;
x:=s(a,0);
y:=s(a-1,1);
s(a,1):=y+(myfunct)*ch; 
END;

END;

END;
(12-26-2019 12:41 AM)oneletterz Wrote: [ -> ]whats wrong with this?

Well, for starters it's posted in the wrong forum. Ask the moderator to move it to the general forum and you'll get lots of feedback.
It was already posted in the Prime forum: https://www.hpmuseum.org/forum/thread-14232.html
This thread should be deleted.
Reference URL's