1

My program performs some simple calculations, look-ups and outputs an answer. What is efficient way to use a Matlab GUI program like I have as a standalone desktop application, which does not require Matlab as a prerequisite?

4
  • Did you consider scilab? Is your program short enough to be rewritten in ocaml? Commented May 16, 2015 at 6:10
  • @Basile Thanks for your suggestion but I am not sure if it is a feasible option. It will require me to rewrite each program I already have written in Matlab. Commented May 23, 2015 at 4:33
  • AFAIK, scilab is quite similar to matlab Commented May 23, 2015 at 6:24
  • @BasileStarynkevitch while it is "quite similar", it will anyway require the whole source code to be rewritten, and all non-existent functions in scilab to be implemented. Commented May 29, 2017 at 16:06

2 Answers 2

3

In order to run any Matlab program on a machine that doesn't have Matlab installed you will need to instal the Matlab Compiler Runtime (MCR).

This is a pre-requisite as it contains the Matlab core functionality that is required by your application and it is royalty-free.

So these are the steps you need:

  1. In your Matlab installation, use the Matlab Compiler to generate a standalone executable of your program.
  2. In the machine you want to deploy your application, Install the same MCR version than the Matlab version you used to generate your program.
  3. Run the program
Sign up to request clarification or add additional context in comments.

2 Comments

I have some questions while following this solution: 1. Can MCR export whole Matlab program (code + GUI) as standalone executable? 2. Will the program run without any hassle after upgrading Matlab in future, or I have to again generate its executable using a newer version?
1. Yes, it will export the whole Matlab program. 2. If you generate a new executable with a different version of Matlab, you need to reinstall the MCR that corresponds to that Matlab version. If you do not change your executable or if you stick to the same Matlab version, you do not need to re-install the MCR
1

If you want to run a MATLAB application as stand-alone... whether it be a GUI or a script, it's not required that MATLAB be installed on your computer. You can, in fact, distribute any MATLAB application that you develop to those who don't have MATLAB installed on their computers, but you need the MATLAB Runtime libraries installed before doing so.

On the developer's end, the use of the MATLAB Compiler is required to make your MATLAB application stand-alone. You need to be cautious in that certain MATLAB functions from certain toolboxes cannot be compiled with the MATLAB Compiler if they are used as part of your MATLAB code in order to create your stand-alone application. This link from MathWorks gives a very comprehensive list of what is compatible per toolbox: http://www.mathworks.com/products/compiler/supported/compiler_support.html

On the user's end, simply get them to install the MATLAB Runtime libraries. That can be found here: http://www.mathworks.com/products/compiler/mcr/

Once the developer uses the MATLAB Compiler to create their stand-alone application and once the user installs the MATLAB Runtime libraries, then you can run any stand-alone MATLAB application. Be advised that there is no way around installing the MATLAB Runtime libraries. You need these for any MATLAB application to run stand-alone.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.