给帮忙看看这个MATLAB程序哪里出问题了

来源:百度知道 编辑:UC知道 时间:2024/05/16 14:01:50
function [ output_args ] = Untitled1( input_args )
%UNTITLED1 Summary of this function goes here
% Detailed explanation goes here
B1=input('B1=');
B2=input('B2=');
B3=input('B3=');
e1=input('e1=');
e2=input('e2=');
e3=input('e3=');
c=input('[x(0),vx(0),y(0),vy(0),z(0),vz(o)]=');
q=1.6e-2; m=0.02
figure
strd{1}='E(x)\neq 1,E(y)\neq 1,E(z)\neq 1,B(x)\neq o,B(y)\neq o,B(z)\neq 1';
[t,y]=ode23('dcc9fun',[0:0.001:20],c,[],q,m,B1,B2,B3,e1,e2,e3);
title(strd{1},'fontsize',12,'fontweight','demi');
xlabel('x');
ylabel('y');
zlabel('z');
view([-51,18]);
comet3(y(:,1),y(:,3),y(:,5));
plot3(y(:,1),y(:,3),y(:,5));
grid on

function ydot=dcc9fun(t,y,flag,q,m,b1,b2,b3,e1,e2,e3)
ydot=[y(2);
q*e1/m+

function ydot=dcc9fun(t,y,flag,q,m,b1,b2,b3,e1,e2,e3)
ydot=[y(2);
q*e1/m+q*b3*y(4)/m-q*b2*y(6)/m;
y(4);
q*e2/m-q*b3*y(2)/m+q*b1*y(6)/m;
y(6);
q*e3/m+q*b2*y(2)/m-q*b1*y(4)/m];

function [ output_args ] = Untitled1( input_args )
%UNTITLED1 Summary of this function goes here
% Detailed explanation goes here
B1=input('B1=');
B2=input('B2=');
B3=input('B3=');
e1=input('e1=');
e2=input('e2=');
e3=input('e3=');
c=input('[x(0),vx(0),y(0),vy(0),z(0),vz(o)]=');
q=1.6e-2; m=0.02
figure
strd{1}='E(x)\neq 1,E(y)\neq 1,E(z)\neq 1,B(x)\neq o,B(y)\neq o,B(z)\neq 1';
[t,y]=ode23('dcc9fun',[0:0.001:20],c,[],q,m,B1,B2,B3,e1,e2,e3);
title(strd{1},'fontsize',12,'fontweight','demi');
xlabel('x');
ylabel('y');
zlabel('z&#