- wavedec: https://www.mathworks.com/help/wavelet/ref/wavedec.html
- wacerec: https://www.mathworks.com/help/wavelet/ref/waverec.html
- appcoef: https://www.mathworks.com/help/wavelet/ref/appcoef.html
- detcoef: https://www.mathworks.com/help/wavelet/ref/detcoef.html
How to reconstruction multilevel wavelet (DWT)
4 ビュー (過去 30 日間)
古いコメントを表示
I want to reconstruction a2, d2, and d1 to be x, but length of a2, d2 ,and d1 are different. How to solve it?. Please help me
x = [5 7 8 9];
[LoD,HiD,LoR,HiR] = wfilters('db2');
% Decomposition
% level 1
cA1 = dyaddown(conv(x,LoD));
cD1 = dyaddown(conv(x,HiD));
% level 2
cA2 = dyaddown(conv(cA1,LoD));
cD2 = dyaddown(conv(cA1,HiD));
%Reconstruction
a1 = conv(dyadup(cA1),LoR);
d1 = conv(dyadup(cD1),HiR);
a2 = conv(dyadup((conv(dyadup(cA2),LoR))),LoR);
d2 = conv(dyadup((conv(dyadup(cD2),HiR))),LoR);
% a2+d2+d1 = x
0 件のコメント
回答 (1 件)
Binaya
2024 年 8 月 21 日
Hi grandong
I understand that you would like to reconstruct your signal from wavelet coefficients. You can use "wavedec" and "waverec" functions to decompose and reconstruct your signal instead of using "dyadup" and "dyaddown" functions.
Here is a sample code snippet to decompose a signal, calculate coefficients and reconstruct the signal:
% Original signal
x = [5 7 8 9]
% Wavelet decomposition using 'db2'
waveletName = 'db2';
level = 2;
% Decompose the signal
[c, l] = wavedec(x, level, waveletName);
% Extract coefficients
cA1 = appcoef(c, l, waveletName, level-1)
cD1 = detcoef(c, l, level-1)
% Reconstruct the signal
xReconstructed = waverec(c, l, waveletName)
You can refer to the following documentation links for more details on:
I hope this answers your query.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Discrete Multiresolution Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!