- lwt: https://www.mathworks.com/help/releases/R2021b/wavelet/ref/lwt.html
- ilwt: https://www.mathworks.com/help/releases/R2021b/wavelet/ref/ilwt.html
Error using ilwt Expected LEVEL to be a scalar with value <= 1.
조회 수: 5 (최근 30일)
이전 댓글 표시
[ca,cd] = lwt(x1,'LiftingScheme',lsc,'Level',2,'Int2Int',true);
...working on ca
x11 = ilwt(double(CA), cd, 'LiftingScheme',lsc,'Int2Int',true,'Level',2);
Error using ilwt
Expected LEVEL to be a scalar with value <= 1.
Error in ilwt>ilwtParser (line 339)
validateattributes(level, {'numeric'},...
Error in ilwt (line 82)
[LS,ext,level,~,isI2I] = ilwtParser(lvl,varargin{:});
댓글 수: 0
답변 (1개)
Umeshraja
2024년 9월 19일
It seems you're encountering an error while using the 'ilwt' function for the Inverse Lifting Wavelet Transform. The issue arises because the 'Level' argument in the 'ilwt’ function must be a non-negative integer less than or equal to length(cd) - 1 where ‘cd’ is the ‘Detail coefficients’. length of ‘cd’ is Lx1 where ‘L’ is the ‘Level’ mentioned in 'lwt' function.
Below is a demonstration of how to perform these arguments correctly
% Define the input data
x1 = 1:100;
% Create a lifting scheme using the 'db3' wavelet
lsc = liftingScheme('Wavelet', 'db3');
% Perform the Lifting Wavelet Transform on the data
% 'Level' is set to 5
[ca, cd] = lwt(x1, 'LiftingScheme', lsc, 'Level', 5, 'Int2Int', true);
% Display the length of the detail coefficients (cd)
disp(['Length of cd: ', num2str(length(cd))]);
% Perform the Inverse Lifting Wavelet Transform (ILWT)
% 'Level' is set to 4, which must be <= length(cd) - 1
x11 = ilwt(double(ca), cd, 'LiftingScheme', lsc, 'Int2Int', true, 'Level', 4);
% Display the reconstructed data
disp('Reconstructed data using ILWT:');
disp(x11');
For more information on the ‘lwt’ and ‘ilwt’ functions, please refer to these MATLAB R2021b documentation links:
Hope it resolves your issue!
댓글 수: 1
Ludovico
2025년 1월 20일
Hello, I apologize for the intrusion.
I am encountering the following issue: when I perform signal reconstruction in a non-integer scenario , i.e. with 'Int2Int' removed and set to true (I correctly configure the reconstruction coefficients such that the 'Level' is set to 4, which must be ≤ length(cd) − 1)), however, after the reconstruction, the resulting signal does not match the original. In particular, it appears “compressed,” as though it were scaled on the left by a factor less than 1. What could be causing this incorrect reconstruction?
Thanks in advance
참고 항목
카테고리
Help Center 및 File Exchange에서 Lifting에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!