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

1 次查看(过去 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