wavelet-based filter
조회 수: 2 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
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!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Signal Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!