我的程序:我的数据太大,上传不了
clear
clc
%----------------------------------------
%(1) read data
%
%----------------------------------------
% case 1: x1(2,:), non-stationary data
% case 2: x2(3,:), non-stationary data
% data format:
fid1=fopen ('E:\Study Sources\important\文章\time_del1_run01.dat','r');
x=fscanf(fid1,'%e ',[3 inf]);
fclose(fid1);
Ns=length(x);
x1=x(2,:);
x2=x(3,:);
fs=1000; % Sampling frequency
t=0:(1/fs):((Ns-1)/fs);
freq=[1:Ns/2]*fs/Ns; % frequency axis
figure (1)
subplot(2,1,1);plot(t,x1);
ylabel ('x1 /um ','fontsize',14,'fontweight','bold')
subplot(2,1,2);plot(t,x2);
ylabel ('x2 /um ','fontsize',14,'fontweight','bold')
xlabel ('Time/s ','fontsize',14,'fontweight','bold')
pause
%----------------------------------------
imf=emd(x1);
emd_visu(x1,1:Ns,imf)
for i=1:nIMF
[A,f,tt]=hhspectrum(c(:,i));
[im,tt]=toimage(A,f);
disp_hhs(im);
colormap(flipud(gray))
end |