wavelet-based filter

2 次查看(过去 30 天)
Faraxen
Faraxen 2022-2-16
回答: Vinay 2024-10-7
I want to create a wavelet-based filter for PQ _APF theory, but each time I increase the level of the decomposition there is this message that appears
"Dimensions of matrices being concatenated are not consistent."
function CA1 = DWT_PQTheo(P)
C = 0;
L = 0;
cA = 0;
cD = 0;
m = 0;
% P1=P(2400:10000-1);
[C, L] = wavedec(P, 12, 'db8');
cA = appcoef(C, L, 'db8', 12);
CA1=zeros(length(P),1);
m=0;
for k=1:length(CA1)
m=m+1;
CA1(k)=cA(m);
end
end

回答(1 个)

Vinay
Vinay 2024-10-7
The issue arises because the 'cA' matrix, which contains the approximate coefficients, has incorrect dimensions compared to the 'CA1' matrix, which matches the length of the original signal. To fix this issue, adjust the size of 'CA1' to match that of 'cA'.
Kindly refer to the below documentation of wavedec for more details:
I hope this helps!

类别

Help CenterFile Exchange 中查找有关 Filter Banks 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by