小波去噪
clcclear
format long;
load hs
ff=hs
=wavedec(ff,4,'db2');
C4=appcoef(C,L,'db2',4);
L1=detcoef(C,L,1);
L2=detcoef(C,L,2);
L3=detcoef(C,L,3);
L4=detcoef(C,L,4);
thr=thselect(ff,'sqtwolog');
disp(thr);
LZ1=wthresh(L1,'s',thr);
LZ2=wthresh(L2,'s',thr);
LZ3=wthresh(L3,'s',thr);
LZ4=wthresh(L4,'s',thr);
CL=;
fff=waverec(CL,L,'db2');
运行程序出现错误
??? Error using ==> horzcat
All matrices on a row in the bracketed expression must have the
same number of rows.
Error in ==> wavelet_h at 49
CL=;
C4,LZ4,LZ3,LZ2,LZ1的列数不对
最后怎么才能才能将C4的低频系数和去噪后的高频信号一起重构为一个信号呢?
多多指教
感谢了
[ 本帖最后由 zhangnan3509 于 2009-1-13 21:10 编辑 ] 我因为没有楼主的数据,人为构成了一组数据运行,没有出现错误。
我给数据给你 你看看
我把数据给你 你看看 实在感谢了0
0.40000000000000
-3.50000000000000
-2.50000000000000
-3.20000000000000
-2.30000000000000
-3.40000000000000
-5.60000000000000
-5.20000000000000
-9.50000000000000
-9.40000000000000
-11.00000000000000
-11.30000000000000
-12.70000000000000
-14.50000000000000
-11.70000000000000
-15.30000000000000
-20.80000000000000
-18.30000000000000
-37.80000000000000
-50.20000000000000
-52.50000000000000
-50.70000000000000
-57.50000000000000
-54.90000000000000
-59.50000000000000
-59.80000000000000
-70.09999999999999
-65.09999999999999
-67.70000000000000
看看哪里有问题 处理这一组数据实际上也是没有问题的,关键在于load hs和ff=hs后可能ff是一组列数据,而CL=;是作为行数据整合。建议把ff构成为行数据:
ff=hs'; 非常非常感谢你了啊!!!!!!!!!!
好人!
页:
[1]