clear;
clc;
close all;
format short
n = 4;
i = 0;
y_1 = rand(1,1)*4;
figure
title('随机信号生成中...');
for i=1:800
line([i-1,i],[y_1,y_1],'LineWidth',2);
y = rand(1,1)*4
line([i,i],[y_1,y],'LineWidth',2);
hold on;
grid on;
y_1 = y;
str = ['随机信号生成中,当前间隔时间:',num2str(5+rand(1,1)*(20-5)),'s。'];
pause(5+rand(1,1)*(20-5));
title(str)
end
请发表评论