zhendongjuzhen.m
function z=zhendongjuzhen(t,x)
F=[25;24;20];
m1=m2=m3=31.2;
k1=k2=k3=67.51;
c1=c2=c3=0.01;
M=[m1,0,0;0,m2,0;0,0,m3];
B=[c1+c2,-c2,0;-c2,c2+c3,-c3;0,-c3,c3];
K=[k1+k2,-k2,0;-k2,k2+k3,-k3;0,-k3,k3];
z=[x(2);inv(M)*(F-B*x(2)-K*x(1))];
执行文件:
t0=0;
tfinal=3;
x0=[0,0;0,0;0,0];
tol=0.001;
trace=0;
[t,x]=ode23('zhendongjuzhen',t0,tfinal,x0,tol,trace);
d=x[:,1];
v=x[:,2]
在经过修改后还是出现这样的错误
??? Error using ==> d:/软件备份/toolbox/matlab/funfun/private/odearguments
Correct syntax is ode23(ZHENDONGJUZHEN,tspan,y0,options).
Error in ==> D:\软件备份\toolbox\matlab\funfun\ode23.m
On line 154 ==> [neq, tspan, ntspan, next, t0, tfinal, tdir, y0, |