Paulo
2009-01-13, 13:09
现在正在自学,从网上copy了一个code到m-file里面,然后运行的时候,command window告诉我“Input argument "y" is undefined.”
Code在这里“http://coweb.cc.gatech.edu/process/203”:
function yprime=ex2(t,y)
yprime=[cos(y(2))+sin(t); sin(y(1))-cos(t)];
tspan=[0, 10];
y0=[5.1; 6.7];
[t, y]=ode45('ex2', tspan, y0);
plot(t, y)
谁能告诉我为什变量y没有定义呀?
先谢谢了!
Code在这里“http://coweb.cc.gatech.edu/process/203”:
function yprime=ex2(t,y)
yprime=[cos(y(2))+sin(t); sin(y(1))-cos(t)];
tspan=[0, 10];
y0=[5.1; 6.7];
[t, y]=ode45('ex2', tspan, y0);
plot(t, y)
谁能告诉我为什变量y没有定义呀?
先谢谢了!