发布网友 发布时间:2022-04-30 00:42
共1个回答
热心网友 时间:2023-10-11 05:37
clear all;
t=[0:0.01:10];%设定时间,间隔0.01,则采样频率为100hz
sig1=sin(10*pi.*t).*(t>=0&t<3|t>6&t<=10)+(sin(10*pi.*t)+sin(20*pi.*t)).*(t>=3&t<=6);
sig2=sin(30*pi.*t).*(t>=0&t<3|t>6&t<=10)+(sin(30*pi.*t)+sin(20*pi.*t)).*(t>=3&t<=6);
figure(1)
plot(t,sig1);
xlabel('t(S)');ylabel('sig_1');
figure(2)
plot(t,sig2);
xlabel('t(S)');ylabel('sig_2');