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 Center および File ExchangeSignal Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by