i==0
p=Sx
q=Sy
while (Sx~=p && Sy~=q)
for n=0:n
if Cx(n)==Sx+1
if Cy(n)==Sy
Sx=Sx+1
end
if Cy(n)==Sy-1
Sx=Sx+1
Sy=Sy-1
end
if Cy(n)==Sy+1
Sx=Sx+1
Sy=Sy+1
end
end
end
i=1+i
Rx[i]=Sx
Ry[i]=sy
end
-----------------------------------------------
I am trying to write this simple code in Mathscript, But Last 3 lines before last END is showing error. I have taken n, Cx, Cy, Sx, Sy, Rx, Ry as input and need only Rx, Ry as output. Cx, Cyy, Rx, Ry are 1D array, Sx, Sy, n are integer numbers.
This is the very 1st time I'm using mathscript and not able to find usefull support in internet to solve this problem. Probably I am not using the proper key words for the search. Can anyone plese help me to solve the isuue or to find suitable material to study to solve such isuues?