w1=0.23;
w2=1;
f0=3.4*10^11;
fs=100;
c=3*10^8;
r=0.00025;
r1=0.005;
r2=0.0008;
t=0:0.01:30;
a=0.25-r*w2;
t3=w2.*t;
t4=floor(t3);
d=abs(t3-0.5-t4);
aaa=1/(1-2*a).*(d-a+abs(d-a));
s=r1.*sin(2.*pi.*w1.*t)+r2.*aaa;
sr=exp(1j*2*pi*f0.*(t-2*s/c));
L=length(sr);
[tfr,t,f] = tfrstft(sr.',1:L,L,hamming(63),0);
figure();
%contour(t/fs,f(1:length(f))*fs,abs(tfr(1:length(f),:)));
mesh(t/fs,f(1:length(f))*fs,abs(tfr(1:length(f),:)));
xlabel('time/s')
ylabel('frequency/Hz')
view([0,90]); % 时间和瞬时频率
xlim([0,30])
这是我自己写的一个用短时傅里叶对回波sr时频分析,想用S变换做时频分析,请问该如何修改呢,修改哪些参数,谢谢
data = load('sr.txt');
data = data - mean(data);
nt =length(data);
dt =0.01;
CF =5;
df =1 / dt / nt;
S = abs(st(data,0,ceil(CF/df),0.01,1));
[m,n] = size(S);
t = (0:n-1)*dt;
f = (0:m-1)*df;
imagesc(t,f,S,[0,max(S(:))*0.6]);
1551346938(1).png
(25.67 KB, 下载次数: 1)
2019-2-28 17:42 上传
2019-2-28 17:40 上传
点击文件名下载附件
67.94 KB, 下载次数: 29
2019-2-28 17:40 上传
点击文件名下载附件
13.39 KB, 下载次数: 36