matlab subplot x=1:600;subplot(311);plot(x,f1);title('A点先正常后异常状态');k=-2*pi;axis([k+2*pi,k+4*pi,0,10]);grid onwhile 1if k>max(x)break;endk=k+0.1;axis([k+2*pi,k+4*pi,0,10]); %移动坐标系pause(0.1);endsubplot(312);plot(x,f2);title(
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/23 09:29:27
matlab subplot x=1:600;subplot(311);plot(x,f1);title('A点先正常后异常状态');k=-2*pi;axis([k+2*pi,k+4*pi,0,10]);grid onwhile 1if k>max(x)break;endk=k+0.1;axis([k+2*pi,k+4*pi,0,10]); %移动坐标系pause(0.1);endsubplot(312);plot(x,f2);title(
matlab subplot
x=1:600;
subplot(311);
plot(x,f1);
title('A点先正常后异常状态');
k=-2*pi;
axis([k+2*pi,k+4*pi,0,10]);
grid on
while 1
if k>max(x)
break;
end
k=k+0.1;
axis([k+2*pi,k+4*pi,0,10]); %移动坐标系
pause(0.1);
end
subplot(312);
plot(x,f2);
title('B点先正常后异常状态');
k=-2*pi;
axis([k+2*pi,k+4*pi,0,10]);
grid on
while 1
if k>max(x)
break;
end
k=k+0.1;
axis([k+2*pi,k+4*pi,0,10]); %移动坐标系
pause(0.1);
end
subplot(313);
plot(x,f3);
title('C点先正常后异常状态');
k=-2*pi;
axis([k+2*pi,k+4*pi,0,10]);
grid on
while 1
if k>max(x)
break;
end
k=k+0.1;
axis([k+2*pi,k+4*pi,0,10]); %移动坐标系
pause(0.1);
end
这三段程序,分开画可以画,一起画该怎么改才能显示在同一个图里面
matlab subplot x=1:600;subplot(311);plot(x,f1);title('A点先正常后异常状态');k=-2*pi;axis([k+2*pi,k+4*pi,0,10]);grid onwhile 1if k>max(x)break;endk=k+0.1;axis([k+2*pi,k+4*pi,0,10]); %移动坐标系pause(0.1);endsubplot(312);plot(x,f2);title(
大神来了!程序按照下边这么写(我自己虚拟了一个f1,f2,f3哈):
x=1:600;
f1=3*abs(sin(x));f2=f1;f3=f1;
h(1)=subplot(311);
plot(x,f1);
title('A点先正常后异常状态');
k=-2*pi;
axis([k+2*pi,k+4*pi,0,10]);
grid on
h(2)=subplot(312);
plot(x,f2);
title('B点先正常后异常状态');
k=-2*pi;
axis([k+2*pi,k+4*pi,0,10]);
grid on
h(3)=subplot(313);
plot(x,f3);
title('C点先正常后异常状态');
k=-2*pi;
axis([k+2*pi,k+4*pi,0,10]);
grid on
linkaxes(h,'x');
while 1
if k>max(x)
break;
end
k=k+0.1;
axis([k+2*pi,k+4*pi,0,10]); %移动坐标系
pause(0.1);
end
效果图: