📄 harmost.asv
字号:
%谐波(harmonics)的ST变换
clc;clear;
%谐波harmonics信号的产生
t=0:300;
w0=100*pi;
t1=64;t2=128;%暂态时间2个T
a3=randint(1,1,[20 1000])/1000;
a5=randint(1,1,[20 1000])/1000;
a7=randint(1,1,[20 1000])/1000;
data=sin(w0*0.000625*t)+a3*sin(3*w0*0.000625*t)+a5*sin(5*w0*0.000625*t)+a7*sin(7*w0*0.000625*t);
noise=awgn(data,30,'measured');%产生30dB的高斯白噪声
data_noise=data+noise;%将产生的30dB高斯白噪声迭加到SAG信号中
%no noise
subplot(2,4,1);plot(t,data);title('电压突降 no noise')
[st_matrix,st_time,st_freq]=st(data);%st of the sag signal
subplot(2,4,2);mesh(abs(st_matrix));
subplot(2,4,3);contourf(abs(st_matrix));
subplot(2,4,4);plot(st_time,abs(st_matrix));
%add noise 30 dB
subplot(2,4,5);plot(t,data_noise);title('电压突降 add noise')
[st_matrix_noise,st_time_noise,st_freq_noise]=st(data_noise);
subplot(2,4,6);mesh(st_time,st_freq,abs(st_matrix_noise));
subplot(2,4,7);contourf(st_time,st_freq,abs(st_matrix_noise));
subplot(2,4,8);plot(st_time,abs(st_matrix_noise));
figure;contourf(abs(st_matrix_noise));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -