tongxiaoxia 发表于 2009-3-31 18:01

伪Wigner-Ville分布前通过带通滤波器

伪Wigner-Ville分布前通过带通滤波器%利用伪Wigner-Ville分布
%采样频率
fs=25000;
%实验信号
n=length(A0); t=1:n; xdata=A0;
%时域波形
figure(1); plot(t/fs,xdata); xlabel('时间 t/n'); ylabel('幅值 A/v');
%带通滤波
wp=2*/fs; ws=2*/fs; rp=3; rs=30;
=buttord(wp,ws,rp,rs); =butter(n,wn);
sig2=filter(b,a,xdata);
%计算伪Wigner-Ville分布
sig3=hilbert(sig2); =tfrpwv(sig3(1:1000));
figure(4); contour(t/fs,f(1:1000)*fs,abs(tfr)); xlabel('时间 t/s'); ylabel('频率 f/Hz');

运行结果为:
??? Operands to the || and && operators must be convertible to logical scalar values.
Error in ==> specgraph.contourgroup.schema>LdoDirtyAction at 256
refresh(h);
Warning: Error occurred while evaluating listener callback.
> In contour at 66
In wigner at 55

上面如果没有通过带通直接伪Wigner-Ville,可以出图,但说明不了故障特征,现在通过带通滤波在做伪Wigner-Ville,结果报错,请教如何改
带通滤波试用了三种频率,contour(t/fs,f(1:1000)*fs,abs(tfr));用了上2种方法,都不行

[ 本帖最后由 ChaChing 于 2009-3-31 21:43 编辑 ]

qingqing5638 发表于 2009-10-20 17:55

回复 楼主 tongxiaoxia 的帖子

http://mathforum.org/kb/message.jspa?messageID=5392302&tstart=0
MatLab suport was kind enough to take a look at this problem for me. It
turns out that there is a bug in contourf command for version 7.0.0 R14
of MatLab. The basic problem is that contourf has problems plotting
negative values.

The command to correct the bug is:
contourf('v6',X,Y,Z)
从别处搜到的
页: [1]
查看完整版本: 伪Wigner-Ville分布前通过带通滤波器