Clear Filters
Clear Filters

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

3 views (last 30 days)
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

Answers (1)

Sachin Lodhi
Sachin Lodhi on 15 Nov 2023
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

Categories

Find more on MATLAB Coder in Help Center and File Exchange

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!