查看单个帖子
旧 2009-01-13, 13:09   #1
Paulo
初级会员
 
注册日期: 2009-01-13
年龄: 39
帖子: 2
声望力: 0
Paulo 正向着好的方向发展
默认 [求助]ODE45的简单问题

现在正在自学,从网上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没有定义呀?

先谢谢了!
Paulo 当前离线   回复时引用此帖