Wavelet decomposition (Meyer) for a signal
5 次查看(过去 30 天)
显示 更早的评论
Hi everyone,
I want to decompose a signal with wavelet decomposition. The aim is to compare the IMF from EMD with wavelet decomposition.
Initially i used this function
[c,l] = wavedec(x,n,wname) returns the wavelet decomposition of the 1-D signal x at level n using the wavelet wname. The output decomposition structure consists of the wavelet decomposition vector c and the bookkeeping vector l, which contains the number of coefficients by level.
with:
A: raw data
n: 8
wname: meyer
When i try this i have this message:
[C,S] = wavedec(A,8,meyer);
Not enough input arguments.
Error in meyer (line 34)
tmp = log(N)/log(2);
What is the problem?
Is this the best way to obtain a multi-scale decomposition with Wavelet's method?
Thanks.
0 个评论
回答(1 个)
Umeshraja
2024-9-5
编辑:Umeshraja
2024-9-21
To decompose a signal using the Meyer wavelet, you should use "dmey" as the wavelet name. Here's an example which include 8-level wavelet decomposition and plotting the coefficients:
load kobe.mat
A=kobe;
n=4;
% Perform wavelet decomposition
[C,S]=wavedec(A,n,"dmey");
%Extract and plot approximation Coefficients
approx = appcoef(C,S,"dmey");
subplot(n+1,1,1)
plot(approx)
title('Approximation Coefficients')
for i = 1:n
% Extract detail coefficients for each level
D = detcoef(C, S, i);
% Plot the detail coefficients
subplot(n+1, 1, i+1);
plot(D);
title(['Detail Coefficients at Level ', num2str(i)]);
end
Additionally, you can use the Wavelet Signal Analyzer app to decompose any 1-D signal. You can launch the app with the following command:
>>waveletSignalAnalyzer
For more information on using the app, please refer to the
To learn more about wavelet decomposition, you can consult the following resources
2-D Transform - https://www.mathworks.com/help/wavelet/ref/wavedec2.html
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!