代码搜索结果
找到约 12,326 项符合
M 的代码
eq3.m
function dy=eq3(t,y)
dy=zeros(2,1);
dy(1)=20*(10+20*cos(t)-y(1))/sqrt((10+20*cos(t)-y(1))^2+(20+15*sin(t)-y(2))^2);
dy(2)=20*(20+15*sin(t)-y(2))/sqrt((10+20*cos(t)-y(1))^2+(20+15*sin(t)-y(2))^2);
shark1.m
[t1,x]=ode45('shier1',[0 15],[25 2]);
[t2,y]=ode45('shier2',[0 15],[25 2]);
x1=x(:,1);x2=x(:,2);
x3=x2./(x1+x2);
y1=y(:,1);y2=y(:,2);
y3=y2./(y1+y2);
ff5.m
[T,Y]=ode45('rigid',[0 12],[0 1 1]);
plot(T,Y(:,1),'-',T,Y(:,2),'*',T,Y(:,3),'+')
eq4.m
function dy=eq4(t,y)
dy=zeros(2,1);
dy(1)=5*(10+20*cos(t)-y(1))/sqrt((10+20*cos(t)-y(1))^2+(20+15*sin(t)-y(2))^2);
dy(2)=5*(20+15*sin(t)-y(2))/sqrt((10+20*cos(t)-y(1))^2+(20+15*sin(t)-y(2))^2);
ff3.m
[x,y,z]=dsolve('Dx=2*x-3*y+3*z','Dy=4*x-5*y+3*z','Dz=4*x-4*y+2*z','t');
x=simple(x)
y=simple(y)
z=simple(z)
ff4.m
[T,Y]=ode15s('vdp1000',[0 3000],[2 0]);
plot(T,Y(:,1),'-')
chase2.m
t0=0,tf=2;
[t,y]=ode45('eq2',[t0 tf],[0 0]);
X=1;
Y=0:0.01:2;
plot(X,Y,'-')
hold on
plot(y(:,1),y(:,2),'*')
rigid.m
function dy=rigid(t,y)
dy=zeros(3,1);
dy(1)=y(2)*y(3);
dy(2)=-y(1)*y(3);
dy(3)=-0.51*y(1)*y(2);
shier.m
function dx=shier(t,x)
dx=zeros(2,1);
dx(1)=x(1)*(1-0.1*x(2));
dx(2)=x(2)*(-0.5+0.02*x(1));
chase1.m
clear
x=0:0.01:1;
y=-5*(1-x).^(4/5)/8+5*(1-x).^(6/5)/12+5/24;
plot(x,y,'*')