How to use varargout function with matlab coder?
1 view (last 30 days)
Show older comments
Jucimar Carpe on 20 Nov 2018
Commented: Jucimar Carpe on 21 Nov 2018
Hi, i'm trying to convert my Matlab script into C with Matlab Coder app but i'm having a problem, when app get into the "Check for Run-Time Issue" window it tells me: Top-level function cannot have varargout.
I'm not a programer so i have only basic knowledge. How can i procede to overcome this issue?
Ryan Livingston on 20 Nov 2018
Starting in MATLAB R2017b, MATLAB Coder supports varargout in entry-point functions. The documentation:
covers this in more detail.
In earlier releases, you can have a wrapper with explicit output arguments. So if you are trying to generate code for
function varargout = entryPoint(a,b,c)
you can instead use
function [out1,out2,out3] = entryPointWrapper(a,b,c)
[out1,out2,out3] = entryPoint(a,b,c);
and generate code from entryPointWrapper.
More Answers (0)
Find more on MATLAB Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!