Hi,
Does anyone here use Maple? I can't find a specific forum for it anywhere on google, so this is my best bet.
I'm having trouble getting 'if' statements to work when nested in a 'for' loop. eg:
for i from 1 to 50 do
if(i=1) then h=i;
else h=i+4;
end if;
end do;
Basically, I need it to do something different for the first instance of the loop. At the moment I have coded the first instance separately and have a normal 'for' loop for 2 to 50.
Any ideas why it doesn't work?
Thanks,
Richard.
Does anyone here use Maple? I can't find a specific forum for it anywhere on google, so this is my best bet.
I'm having trouble getting 'if' statements to work when nested in a 'for' loop. eg:
for i from 1 to 50 do
if(i=1) then h=i;
else h=i+4;
end if;
end do;
Basically, I need it to do something different for the first instance of the loop. At the moment I have coded the first instance separately and have a normal 'for' loop for 2 to 50.
Any ideas why it doesn't work?
Thanks,
Richard.