用四阶龙格库塔法求解K=2请问如何在MATLAB里得出N1 N2 P1 P2的一系列值,并绘出N1和P1,N2和P2之间
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/11/05 22:43:38
用四阶龙格库塔法求解
K=2
请问如何在MATLAB里得出N1 N2 P1 P2的一系列值,并绘出N1和P1,N2和P2之间的关系图?
K=2
请问如何在MATLAB里得出N1 N2 P1 P2的一系列值,并绘出N1和P1,N2和P2之间的关系图?
初值给一下.
在Matlab下输入:edit,然后将下面两行百分号之间的内容,复制进去,保存
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function dxdt=ode_Miss_ghost(t,x)
%分别用x(1),x(2),x(3),x(4)代替N1,P1,N2,P2
N1=x(1);
P1=x(2);
N2=x(3);
P2=x(4);
K=2;
tau_c=3e-9;
tan_p=6e-12;
beta =5e-5;
delta=0.692;
eta =0.0001;
fm =8e6;
Ith =26e-3;
Ib =1.5*Ith;
Im =0.3*Ith;
I1=Ib+Im*sin(2*pi*fm*t)+K*P2;
I2=Ib+Im*sin(2*pi*fm*t)+K*P1;
dxdt=[
(I1/Ith-N1-(N1-delta)/(1-delta)*P1)/tau_e;
((N1-delta)/(1-delta)*(1-eta*P1)*P1-P1+beta*N1)/tau_p;
(I2/Ith-N2-(N2-delta)/(1-delta)*P2)/tau_e;
((N2-delta)/(1-delta)*(1-eta*P2)*P2-P2+beta*N2)/tau_p;
];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
在Matlab下面输入:
t_start=0;
t_end=2e-9;
y0=[1e-3;1e-4;0;0]; %初值
[x,y]=ode15s('ode_Miss_ghost',[0,t_end],y0);
plot(x,y);
legend('N1','P1','N2','P2');
xlabel('x');
在Matlab下输入:edit,然后将下面两行百分号之间的内容,复制进去,保存
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function dxdt=ode_Miss_ghost(t,x)
%分别用x(1),x(2),x(3),x(4)代替N1,P1,N2,P2
N1=x(1);
P1=x(2);
N2=x(3);
P2=x(4);
K=2;
tau_c=3e-9;
tan_p=6e-12;
beta =5e-5;
delta=0.692;
eta =0.0001;
fm =8e6;
Ith =26e-3;
Ib =1.5*Ith;
Im =0.3*Ith;
I1=Ib+Im*sin(2*pi*fm*t)+K*P2;
I2=Ib+Im*sin(2*pi*fm*t)+K*P1;
dxdt=[
(I1/Ith-N1-(N1-delta)/(1-delta)*P1)/tau_e;
((N1-delta)/(1-delta)*(1-eta*P1)*P1-P1+beta*N1)/tau_p;
(I2/Ith-N2-(N2-delta)/(1-delta)*P2)/tau_e;
((N2-delta)/(1-delta)*(1-eta*P2)*P2-P2+beta*N2)/tau_p;
];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
在Matlab下面输入:
t_start=0;
t_end=2e-9;
y0=[1e-3;1e-4;0;0]; %初值
[x,y]=ode15s('ode_Miss_ghost',[0,t_end],y0);
plot(x,y);
legend('N1','P1','N2','P2');
xlabel('x');
用四阶龙格库塔法求解K=2请问如何在MATLAB里得出N1 N2 P1 P2的一系列值,并绘出N1和P1,N2和P2之间
推论:P1/P2=n1/n2
有关概率论的问题!两个独立的几何分布N1~p1;N2~p2的和N1﹢N2还服从几何分布吗? 急求回复!
化学上温度T和体积相等时,为什么P1/P2=粒子数有关n1/n2,
f_num=0#defineB0.809%d,%d\n",n1,n2,n3);swap(p1,p2)
n1=2,n2=++n1,n1=n2++ 执行后n1,n2的值
超声波测速题在一条公路上,一超声波测速仪正正对着一辆迎面而来的汽车测速.P1,P2分别是仪器发出的超声波信号,N1,N2
一理想变压器,原副线圈匝数之比为n1:n2=10:1,当这个变压器正常工作时,输入功率和输出功率之比P1:P2=?;当副
若自然数n1>n2,且n1^2-n2^2-2n1-2n2=19,求n1与n2的值
C++p1->next=p2;和p2=p1->next;是不是都代表p2指向p1的下一个地址?
P1=¬P2 P1= P2 力P1 等于力p2意义和区别
p1=p2; \\p1 的指针指向 p2,意味着p2值改变,p1值也改变