声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1353|回复: 2

[理论方法] 急需帮助 时频分析源程序帮忙分析一下

[复制链接]
发表于 2009-5-12 12:02 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
clc;
clear;
f=[1:1536];
t=[1:50000]/6144;
x=load('20071031C_单参数导出_VY16s.txt');%exp(j*pi*t.^2/2);%
x=x';
%x=sin(2*pi*500*t);
figure(1);
%plot(t,x);
plot(t,x(1:length(t)));
xlabel('时间(s)');
ylabel('振动码值');
%title('时域信号波形');
tic
y=wdf(x,t,f);
toc
figure(2);
image(t,f,abs(y)*200);
xlabel('时间(s)');
ylabel('频率(Hz)');
%title('WVD频谱分布—WVD谱1');
colormap(gray(256));
% figure(3);
% mesh(t,f,abs(y)*200);
% xlabel('时间(s)');
% ylabel('频率(Hz)');
% title('WVD频谱分布—WVD谱1');

f1=[0:1536];
tic
y1=wdf1(x,t,f1);
toc;
figure(4);
image(t,f,abs(y1)*200);
xlabel('时间(s)');
ylabel('频率(Hz)');
%title('WVD频谱分布—WVD谱2');
colormap(gray(256));
% tic
% [y,t0]=wdf2(x,t,f,3);
% toc
% f1=[0:1024];
% tic
% [y1,t0]=wdf3(x,t,f1,3);
% toc
% figure(4)
% subplot(1,2,1)
% image(t0,f,abs(y)*100)
% colormap(gray(256))
% subplot(1,2,2)
% image(t0,f,abs(y1)*100)
% colormap(gray(256))
L = length(x);
Fs = 6144;
NFFT = 2^nextpow2(L); % Next power of 2 from length of y
Y = fft(x,NFFT)/L;
f = Fs/2*linspace(0,1,NFFT/2+1);
% Plot single-sided amplitude spectrum.
figure(5);
plot(f,2*abs(Y(1:NFFT/2+1))) ;
%title('飞机机翼振动单边幅度谱');
xlabel('频率 (Hz)');
ylabel('幅值|X(f)|');

我在处理 的时候,总是出现内存溢出“out of memory”提示
有没有人帮忙解决一下

还有这个程序只能处理4000个大小的数据
再大的话就出现上述情况
回复
分享到:

使用道具 举报

发表于 2009-5-14 21:06 | 显示全部楼层
将其做1024点的fft
发表于 2009-6-1 08:47 | 显示全部楼层

你的数据文件??

你的数据文件??
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-9-22 05:30 , Processed in 0.059647 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表