Issue with cwtft2 Function in MATLAB R2024b

조회 수: 1 (최근 30일)
Kobi
Kobi 2025년 3월 8일
답변: Aastha 2025년 3월 27일
Dear Support Team,
I have encountered an issue with the cwtft2 function in MATLAB R2024b. In MATLAB R2021a, this function accepts complex matrices without any problems. However, in R2024b, the same function throws an error when provided with complex input.
For example, the following command works in R2021a but fails in R2024b:
cwtft2(randn(4) + 1i * randn(4))
Error using wavelet.internal.cwt2.cwt2 (line 8)
Invalid argument at position 1. Value must be real.

Error in cwtft2 (line 103)
cwtstruct = wavelet.internal.cwt2.cwt2(X,varargin{1:max(0,plotIDX-1)},varargin{plotIDX+1:end});
Could you clarify why this change has occurred? Additionally, how can I use cwtft2 with complex matrices in the newer version (R2024b)?
Thank you for your assistance.
Best regards,
  댓글 수: 2
Torsten
Torsten 2025년 3월 8일
편집: Torsten 2025년 3월 8일
This is only a MATLAB forum giving help "from user to user".
You should address your question directly to the Mathworks Support Team:
Walter Roberson
Walter Roberson 2025년 3월 9일
It is true that the documentation for the function does not mention that the parameter needs to be real-valued, so it is understandable to expect complex-valued data to work.

댓글을 달려면 로그인하십시오.

답변 (1개)

Aastha
Aastha 2025년 3월 27일
Hi @Kobi,
I tried to use complex values as input to “cwtft2” function in MATLAB R2024b and got a similar error.
In the MathWorks documentation for “cwtft2” function, the section “Input Arguments” does not mention “Complex Number Support: Yes”; whereas if you see the documentation of functions that accept complex inputs such as “transpose” function, the “Input Arguments” section mentions “Complex Number Support: Yes” which implies that the function intends to accept complex-valued arguments.
You can contact MathWorks Technical Support for the workaround.
Kindly refer to the documentation links of “cwtft2” and “transpose” functions for any further queries:
I hope this is helpful!

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by