How do I pass input arguments to a compiled executable and define the output arguments that the user can see?

23 views (last 30 days)
I have recently purchased the MATLAB Compiler and have a question regarding it's workflow.
I have a series of .m files that I have successfully packaged up as a standalone executable that will be released to a user without a MATLAB license. I need the user to be able to update and send input parameters to the executable for it to run and I want to define what outputs the user has visibility of.
Is there a way to achieve this workflow? Potentially as an app design that is linked to the standalone .exe?
I've included an image below showing the current workflow in MATLAB. I am passing five parameters to the main script that represent what has been compiled as an executable. There are three numerical inputs, one file and one file path.
The outputs I want the user to have sight of will all be numerical values or arrays that can be used for plotting.

Accepted Answer

Steven Lord
Steven Lord on 28 Feb 2023
See this documentation page. Defining input arguments is relatively straightforward. For output arguments see the "Using a MATLAB File You Plan to Deploy" section on that page.
Jack Smith
Jack Smith on 28 Feb 2023
Hi Walter,
This makes sense to me now, it was the step to convert the m files to a function before compiling that I was missing.
The process of converting inputs from characters was clear from the documentation but thanks for highlighting the issues that could occur regarding number of input parameters.

Sign in to comment.

More Answers (0)


Find more on MATLAB Compiler 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!