필터 지우기
필터 지우기

Matlab coder returning non specific issue description during check for runtime issues step

조회 수: 3 (최근 30일)
Hello,
For use in a student project, I am attempting to convert an audio-based transmitter/receiver function from Matlab to C/Cpp.
I went through the process of correcting various issues, brought up by the Matlab coder tool.
However, the latest issue brought up by the "Check for run-time issues" step does not mention any line / sub-function in the code. Instead, it simply states:
" Insufficient number of outputs from right hand side of equal sign to satisfy assignment.
Use help codegen for more information on using this command.
Insufficient number of outputs from right hand side of equal sign to satisfy assignment."
I do not know where in the code this issue is located, and given the project size, I would prefer not to start looking with no clear leads.
The function I am trying to convert is running correctly, and no issues are found before the runtime issues check (input types, %#codegen, etc.).
Any help in accessing a more detailed error message / pointing me in the right direction would be greatly appreciated.
Thanks (:
Jonathan

답변 (1개)

Sachin Lodhi
Sachin Lodhi 2023년 11월 15일
Hi Jonathan,
Based on my understanding, it seems that you are encountering an issue when utilizing the MATLAB Coder tool.
The error usually arises when there's a naming conflict in the code, such as when the output variable name is the same as the function name. For instance -
[stft, t, f]= stft(x,wlen,nfft);
In the above function, the output variable on the left side is 'stft', and the function name on the right side is also 'stft' which is causing the error. You should look for similar errors in your code.
Alternatively, the issue could also be due to a variable in your MATLAB program that shares its name with an inbuilt MATLAB function. Please find the relevant MATLAB Answer here - https://www.mathworks.com/matlabcentral/answers/254324-insufficient-number-of-outputs-from-right-hand-side-of-equal-sign-to-satisfy-assignment
I hope this helps.
Best Regards,
Sachin

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by