Re: [Scilab-users] Invalid Index error when using for and select

2013-05-07 Thread Mathieu Dubois
I don't know if that's your problem but indices start at 1 in scilab (like in matlab). On 2013-05-07 18:34, MattM wrote: Hi, Im using the following code: n=1 q=2 for t=0:1:15 select t case 0 B(0)=0 else B(t) = abs(besselj(q,q.*1/15*t)/(q.*1/15*t)); end end t2=

[Scilab-users] Invalid Index error when using for and select

2013-05-07 Thread MattM
Hi, Im using the following code: n=1 q=2 for t=0:1:15 select t case 0 B(0)=0 else B(t) = abs(besselj(q,q.*1/15*t)/(q.*1/15*t)); end end t2=linspace(0,1,15); plot2d(t2,B) To define B at the points t=0,1,2,3...16, however as there is a t on the denominator scilab