⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 yt324562222222.m

📁 傅立叶计算以及短时傅立叶计算、功率谱分析及各自图形
💻 M
字号:
clear;
t=0:0.001:2.047;
x=0.8*sin(2*pi*50*t)+1.5*sin(2*pi*100*t)+0.4*sin(2*pi*150*t)+0.1*sin(2*pi*200*t);
xx=x';
x1=hilbert(xx);
[tfr,t,f]=tfrwv(x1);





clear;
t=0:0.001:2.047;
x=0.8*sin(2*pi*50*t)+1.5*sin(2*pi*100*t)+0.4*sin(2*pi*150*t)+0.1*sin(2*pi*200*t);
figure(1);
subplot(211);
plot(x(1:800))
y=fft(x,2048);
n=0:2047;f=1000*n/2048;
pyy=y.*conj(y)/2048;
subplot(212);
plot(f(1:1000),abs(y(1:1000)));

%%%%功率谱分析
xx=x';
x1=hilbert(xx);
[tfr,t,f]=tfrstft(x1);
figure(2);subplot(211);
plot(t,abs(tfr(1:600,:)));
subplot(212);
contour(t,f,abs(tfr));%%%%%短时傅立叶变换
[tfr,t,f]=tfrwv(x1);
figure(3);
subplot(211);contour(t,f,tfr);


x=1.9*sin(2*pi*t*100)+0.7*sin(2*pi*t*150)+0.1*sin(2*pi*t*200);%松动
[c,l]=wavedec(x,8,'db10');
d6=wrcoef('d',c,l,'db10',6);
ss=0;for i=1:1024;f=d6(i)*d6(i);ss=ss+f;end;
d7=wrcoef('d',c,l,'db10',7);
ss=0;for i=1:1024;f=d7(i)*d7(i);ss=ss+f;end;
a8=wrcoef('a',c,l,'db10',8);
ss=0;for i=1:1024;f=a8(i)*a8(i);ss=ss+f;end;%小波能量计算


 x=1.9*sin(2*pi*t*50)+0.7*sin(2*pi*t*100);%裂纹数据

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -