如何能使时频图的时间序列能变得和上面的时域图一样,我的代码如下
clear;close all;clc;
Data = textread('Cal_32_0.005_R_1_3.txt','%f','headerlines',53);
T = 0.005; Fs = 1/T;
N = length(Data);t = (0:N-1)'*T;
% 时频图
windows = 256; noverlap = 250; nfft = 256;
figure;subplot(5,5,[6,7,8,9,11,12,13,14,16,17,18,19,21,22,23,24]);
% 时域图
subplot(5,5,[1,2,3,4]);plot(t,Data);ylabel('Acc.(cm/s^2)');spectrogram(Data,windows,noverlap,nfft,Fs,'yaxis');colorbar off;