马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
这是我的运行程序,想要画出一个轨迹图,x(5)和x(7)分别是横、纵方向上的位移。“chen”是计算程序,文件里内容比较繁冗,我将它作为附件给出(因为贴出来之后实在没法看)。
global w
w=200;
%x0=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
x0=[0.01,-0.01,0.0001,-0.00001,0.01,-0.01,0.0001,-0.00001,0.01,-0.01,0.0001,-0.00001,0.01,-0.01,0.0001,-0.00001,0.01,-0.01,0.0001,-0.00001,0.01,-0.01,0.0001,-0.00001,0.01,-0.01,0.0001,-0.00001,0.01,-0.01,0.0001,-0.00001];
tt=1000*2*pi/w;
[t,x]=ode45('chen',[0:tt/200:400*tt],x0);
plot(x(:,5),x(:,7));
hold on;
我的问题就是运行上面的程序之后,无法绘出曲线,最后给出的图像里就是一个点。请各位达人施以援手,谢谢。
[ 本帖最后由 sigma665 于 2008-5-28 14:22 编辑 ] |