怎样在matlab中将两个图画在同一个坐标轴中程序1:clearR1=8*10^(-3);C1=1500;I=10;r=1.5;t=[0:100:400];A=-R1*r^4*(r-1)^2*(r^2+r+1)/((r^4+r^2+1)^2*(r+1));B=-t.*(r^4+r^2+1)*(r+1)/(R1*C1*(r^2+r+1)*(r^2+1));C=(R1*r^8*(r+1)+R1*r^2*(r^2+1)^2
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 06:54:29
怎样在matlab中将两个图画在同一个坐标轴中程序1:clearR1=8*10^(-3);C1=1500;I=10;r=1.5;t=[0:100:400];A=-R1*r^4*(r-1)^2*(r^2+r+1)/((r^4+r^2+1)^2*(r+1));B=-t.*(r^4+r^2+1)*(r+1)/(R1*C1*(r^2+r+1)*(r^2+1));C=(R1*r^8*(r+1)+R1*r^2*(r^2+1)^2
怎样在matlab中将两个图画在同一个坐标轴中
程序1:
clear
R1=8*10^(-3);
C1=1500;
I=10;
r=1.5;
t=[0:100:400];
A=-R1*r^4*(r-1)^2*(r^2+r+1)/((r^4+r^2+1)^2*(r+1));
B=-t.*(r^4+r^2+1)*(r+1)/(R1*C1*(r^2+r+1)*(r^2+1));
C=(R1*r^8*(r+1)+R1*r^2*(r^2+1)^2)/((r+1)*(r^4+r^2+1));
D=t*r^4/(C1*(r^4+r^2+1));
E=2.718.^B;
V1=I.*(A.*E+C+D);
plot(t,V1)
得到的图像为图1:
程序2:
clear
R1=8*10^(-3);
C1=1500;
I=10;
r=1.5;
T=[400:10:1000];
A=-R1*r^4*(r-1)^2*(r^2+r+1)/((r^4+r^2+1)^2*(r+1));
B=-T.*(r^4+r^2+1)*(r+1)/(R1*C1*(r^2+r+1)*(r^2+1));
C=(R1*r^8*(r+1)+R1*r^2*(r^2+1)^2)/((r+1)*(r^4+r^2+1));
D=400*r^4/(C1*(r^4+r^2+1));
E=2.718.^B;
F=-(T-400).*(r^4+r^2+1)*(r+1)/(R1*C1*(r^2+r+1)*(r^2+1));
G=2.718.^F;
V2=I.*(A.*E-A.*G+D);
plot(T,V2)
得到的图为图2:
图1中X轴的终点就是图2中X轴的起点,我想把两个图弄到同一个坐标系中.请问该怎样弄啊?两个图X轴上两点间的间距不一样啊.
怎样在matlab中将两个图画在同一个坐标轴中程序1:clearR1=8*10^(-3);C1=1500;I=10;r=1.5;t=[0:100:400];A=-R1*r^4*(r-1)^2*(r^2+r+1)/((r^4+r^2+1)^2*(r+1));B=-t.*(r^4+r^2+1)*(r+1)/(R1*C1*(r^2+r+1)*(r^2+1));C=(R1*r^8*(r+1)+R1*r^2*(r^2+1)^2
clear
R1=8*10^(-3);
C1=1500;
I=10;
r=1.5;
t=[0:100:400];
A=-R1*r^4*(r-1)^2*(r^2+r+1)/((r^4+r^2+1)^2*(r+1));
B=-t.*(r^4+r^2+1)*(r+1)/(R1*C1*(r^2+r+1)*(r^2+1));
C=(R1*r^8*(r+1)+R1*r^2*(r^2+1)^2)/((r+1)*(r^4+r^2+1));
D=t*r^4/(C1*(r^4+r^2+1));
E=2.718.^B;
V1=I.*(A.*E+C+D);
plot(t,V1)
hold on; %%% 增添hold on 命令即可
clear
R1=8*10^(-3);
C1=1500;
I=10;
r=1.5;
T=[400:10:1000];
A=-R1*r^4*(r-1)^2*(r^2+r+1)/((r^4+r^2+1)^2*(r+1));
B=-T.*(r^4+r^2+1)*(r+1)/(R1*C1*(r^2+r+1)*(r^2+1));
C=(R1*r^8*(r+1)+R1*r^2*(r^2+1)^2)/((r+1)*(r^4+r^2+1));
D=400*r^4/(C1*(r^4+r^2+1));
E=2.718.^B;
F=-(T-400).*(r^4+r^2+1)*(r+1)/(R1*C1*(r^2+r+1)*(r^2+1));
G=2.718.^F;
V2=I.*(A.*E-A.*G+D);
plot(T,V2)