查看单个帖子
旧 2010-10-17, 18:29   #1
guozhiping
初级会员
 
注册日期: 2010-10-14
帖子: 4
声望力: 0
guozhiping 正向着好的方向发展
默认 应用Runge_kutta法的程序怎么改正?

请大家帮我看一下错误在哪里,我找不出来:

function dydt=vdp1(t,y)
dydt=[y(2);(1-y(1)^2)*y(2)-y(1)];
[t,y]=ode23(@vdp1,[0 20],[0 -0.5]);
% plot(t,y(:,1));



??? function dydt=vdp1(t,y)
|
Error: Function definitions are not permitted at the prompt or in scripts.
guozhiping 当前离线   回复时引用此帖