- https://www.mathworks.com/help/wavelet/ref/wpdec.html
- https://www.mathworks.com/help/wavelet/ref/wptree.wpcoef.html
How and What features are extracted using Wavelet Packet Transform
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have and Signal of 10000*3 size.I would like to extract the features from Wavelet coefficiensts of last level. Since it is wavalet packet transform,for 3rd level i will be having 8 sub bands.How this help us to extract the Features and What are the Features need to Extract generally
wname='sym5';level=3;keepap=1;
crit='shannon';critv=0;
% sorh='s';
% dwtmode('per'); %signal Extension
emg_notch=abs(rand(10000,3));
wpt(:,i)=wpdec(emg_notch(:,i),level,wname,crit,critv); %Wpt Decomposition
%% Level 3 Coefficienst %%
WP_cfs10(:,i)=wpcoef(wpt(:,i),[3 0]);
WP_cfs11(:,i)=wpcoef(wpt(:,i),[3 1]);
WP_cfs12(:,i)=wpcoef(wpt(:,i),[3 2]);
WP_cfs13(:,i)=wpcoef(wpt(:,i),[3 3]);
WP_cfs14(:,i)=wpcoef(wpt(:,i),[3 4]);
WP_cfs15(:,i)=wpcoef(wpt(:,i),[3 5]);
WP_cfs16(:,i)=wpcoef(wpt(:,i),[3 6]);
WP_cfs17(:,i)=wpcoef(wpt(:,i),[3 7]);
0 Commenti
Risposte (1)
Suraj Kumar
il 30 Ago 2024
Hi C Prasad,
To extract features using the Wavelet Packet Transform (WPT), you can go through the following steps along with the attached code snippets:
1. Decompose the signal using the ‘wpdec’ function and loop over each column of your signal to cover different channels and extract the coefficients from each sub-band using the ‘wpcoef’ function.
for i = 1:3
wpt{i} = wpdec(emg_notch(:, i), level, wname, crit, critv);
for j = 0:7
WP_cfs{j+1, i} = wpcoef(wpt{i}, [3, j]);
end
end
2. After getting the coefficients, you can extract various features accordingly.
features(j, 1, i) = mean(coeffs);
features(j, 2, i) = std(coeffs);
features(j, 3, i) = sum(coeffs.^2);
features(j, 4, i) = entropy(coeffs);
features(j, 5, i) = max(coeffs);
To know more about the ‘wpdec’ and ‘wpcoef’ function in MATLAB, you can refer to the following documentations:
Hope this helps!
0 Commenti
Vedere anche
Categorie
Scopri di più su Signal Analysis in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!