I am solving a differential equation and I get a list of points
(%i1) load("dynamics");
ydot: 1-x+4*y;
a: rk(ydot,y,1,[x,0,1,0.1]);
(%o1) /opt/local/share/maxima/5.17.1/share/dynamics/dynamics.mac
(%o2) 4*y-x+1
(%o3) [[0,1],[0.1,1.608933333333333],[0.2,2.505006151111111],
[0.3,3.829414509150815],[0.4,5.792785270450575],
[0.5,8.709317547440138],[.6000000000000001,13.0477126294347],[.
7000000000000001,19.50714785308206],[0.8,29.13060935737094],
[0.9,43.47395433203548],[1.0,64.8581068089084]]
The results are good so next I try to plot them.
(%i32) wxplot2d(a[i][2],[i,1,11],[nticks,11])$
Subscript must be an integer:
i
-- an error. To debug this try debugmode(true);
I keep getting the Subscript must be an integer error. I haven't seen
any function that makes sure a variable is an integer. I tried
round() but that didn't work. All the examples use variables as
parameters to functions, not arrays, list or matrices.
Peter Nachtwey