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=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 doesn't let me plot this for t=0. I still want to
include
this point however. I have tried using select and cases to define
B(0) as
being equal to zero, however I get an invalid index error.
Thanks
Matt
--
View this message in context:
http://mailinglists.scilab.org/Invalid-Index-error-when-using-for-and-select-tp4026668.html
Sent from the Scilab users - Mailing Lists Archives mailing list
archive at Nabble.com.
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users