MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/)
-   数学 (https://www.labfans.com/bbs/f15/)
-   -   [问题] 应用Runge_kutta法的程序怎么改正? (https://www.labfans.com/bbs/t12176/)

guozhiping 2010-10-17 06:29 PM

应用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.


所有时间均为北京时间。现在的时间是 11:24 PM

Powered by vBulletin
版权所有 ©2000 - 2022,Jelsoft Enterprises Ltd.


SEO by vBSEO ©2009, Crawlability, Inc.