Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Matlab stand-alone applications

Subject: Matlab stand-alone applications

From: Edward Bernhardi

Date: 14 Aug, 2007 14:58:54

Message: 1 of 13

I see that it is possible to create a stand-alone (exe)
file from a matlab m-file.

Would it be possible to run this stand-alone exe-file on a
computer that doesn't have Matlab (and thus the Matlab
compiler) installed?

How does this exe-file manage graphics like in the case
where the original m-file plotted some graphs to the
screen? Would the stand-alone exe-file also plot graphs?

Thanks a million

Subject: Matlab stand-alone applications

From: Titus

Date: 14 Aug, 2007 15:11:43

Message: 2 of 13


"Edward Bernhardi" <edwardbernhardi@gmail.com> schrieb im Newsbeitrag
news:f9sfve$7g2$1@fred.mathworks.com...
>I see that it is possible to create a stand-alone (exe)
> file from a matlab m-file.
>
> Would it be possible to run this stand-alone exe-file on a
> computer that doesn't have Matlab (and thus the Matlab
> compiler) installed?
>
> How does this exe-file manage graphics like in the case
> where the original m-file plotted some graphs to the
> screen? Would the stand-alone exe-file also plot graphs?
>
> Thanks a million

Hi Edward,
yes it does. What you need to do, is installing the so called
MCR (MATLAB Component Runtime) on the computer
without MATLAB. The MCR comes with the compiler and
you can install it freely on other machines.

Titus

Subject: Matlab stand-alone applications

From: Vivek Bannore

Date: 14 Aug, 2007 15:16:58

Message: 3 of 13

Yes, using MATLAB compiler (latest version is recommended
ofcourse compatible with your current version of MATLAB)
stand-alone applications can be created and deployed to
computers running no MATLAB.

http://www.mathworks.com/access/helpdesk/help/toolbox/compi
ler/

The only thing that needs to be installed is the MCR for
that particular version of compiler and MATLAB and is
freely available. It is also located in one of the
directories once compiler is installed...forgot which
one..read on the above link under section of deploying the
standalone application.

Whatever functions the M-file performed, generating graphs
figures, all will be done even when compiled into a
standalone application. Please note that if certain MAT-
files and images are required for your M-file to work,
then after compiling, it is necessary to copy such MAT-
files and images to the root directory of the exe for the
propoer functioning or else you gonna have errors since
MAT-files and images are not compiled.

I hope this helps you....i have compiled a very
complicated GUI and deployed to a third machine after
installing MCR, the performance is exactly the same as it
would be if i executed an M-file.

cheers
Vivek

Subject: Matlab stand-alone applications

From: M

Date: 14 Aug, 2007 15:48:22

Message: 4 of 13

"Vivek Bannore" <vivek.bannore.nospam@mathworks.com> wrote
in message <f9sh1a$oep$1@fred.mathworks.com>...
> Yes, using MATLAB compiler (latest version is recommended
> ofcourse compatible with your current version of MATLAB)
> stand-alone applications can be created and deployed to
> computers running no MATLAB.
>
> http://www.mathworks.com/access/helpdesk/help/toolbox/compi
> ler/
>
> The only thing that needs to be installed is the MCR for
> that particular version of compiler and MATLAB and is
> freely available. It is also located in one of the
> directories once compiler is installed...forgot which
> one..read on the above link under section of deploying the
> standalone application.
>
> Whatever functions the M-file performed, generating graphs
> figures, all will be done even when compiled into a
> standalone application. Please note that if certain MAT-
> files and images are required for your M-file to work,
> then after compiling, it is necessary to copy such MAT-
> files and images to the root directory of the exe for the
> propoer functioning or else you gonna have errors since
> MAT-files and images are not compiled.
>
> I hope this helps you....i have compiled a very
> complicated GUI and deployed to a third machine after
> installing MCR, the performance is exactly the same as it
> would be if i executed an M-file.
>
> cheers
> Vivek


I think you just answered my question as well. How do .fig
files fit into the picture?

Thanks,
M

Subject: Matlab stand-alone applications

From: Vivek Bannore

Date: 14 Aug, 2007 15:53:06

Message: 5 of 13

> I think you just answered my question as well. How
do .fig
> files fit into the picture?
>
> Thanks,
> M


what do you mean M ? expand a bit

Subject: Matlab stand-alone applications

From: M

Date: 14 Aug, 2007 16:19:32

Message: 6 of 13

"Vivek Bannore" <vivek.bannore.nospam@mathworks.com> wrote
in message <f9sj52$rj2$1@fred.mathworks.com>...
> > I think you just answered my question as well. How
> do .fig
> > files fit into the picture?
> >
> > Thanks,
> > M
>
>
> what do you mean M ? expand a bit

I have been having trouble deploying a stand alone
application , right now I load background.fig and plot over it.
does background.fig need to be added into the 'other files'
during the mcc compilation process, or does it need to be in
the directory the .exe file is on the deployed machine?

Is there a better way to do this? My goal is to plot current
data (which my compiled program gets from a database and
processes) over a regional map of roads, landmarks, etc
(background.fig) I do not wish to re-create the background
at each call as processing time is an issue. (I am trying to
 keep the run time under 10 seconds as that is the frequency
I receive new data)
Thanks,
M

Subject: Matlab stand-alone applications

From: Vivek Bannore

Date: 14 Aug, 2007 16:33:34

Message: 7 of 13

M, I think you could try to compile it with your M-file
with the MCC command just make sure you write the complete
name like for example

mcc myfile1.m myfile2.m background.fig

Try this and see because in the case of GUIs, the GUI is
basically a *.fig file and the components on it are
executed with the help of its corresponding *.m file. And
when i compiled my files

mcc test.m test.fig

it worked fine and works now too...so it shouldn't be a
problem at all.... try this...if it doesn't work .... copy
the error and try compiling without the background.fig and
then copy it to the root directory where you will execute
the *.exe so that your M-file will read it then. Either of
them should work fine....

if not the error you copied earlier, post it here....

cheers
vivek

Subject: Matlab stand-alone applications

From: Idan

Date: 28 Aug, 2007 14:13:33

Message: 8 of 13

You mentioned that the MCR is freely available. Could you
please provide a link where i can download the MCR?

Idan

"Vivek Bannore" <vivek.bannore.nospam@mathworks.com> wrote
in message <f9sh1a$oep$1@fred.mathworks.com>...
> Yes, using MATLAB compiler (latest version is
recommended
> ofcourse compatible with your current version of MATLAB)
> stand-alone applications can be created and deployed to
> computers running no MATLAB.
>
>
http://www.mathworks.com/access/helpdesk/help/toolbox/compi
> ler/
>
> The only thing that needs to be installed is the MCR for
> that particular version of compiler and MATLAB and is
> freely available. It is also located in one of the
> directories once compiler is installed...forgot which
> one..read on the above link under section of deploying
the
> standalone application.
>
> Whatever functions the M-file performed, generating
graphs
> figures, all will be done even when compiled into a
> standalone application. Please note that if certain MAT-
> files and images are required for your M-file to work,
> then after compiling, it is necessary to copy such MAT-
> files and images to the root directory of the exe for
the
> propoer functioning or else you gonna have errors since
> MAT-files and images are not compiled.
>
> I hope this helps you....i have compiled a very
> complicated GUI and deployed to a third machine after
> installing MCR, the performance is exactly the same as
it
> would be if i executed an M-file.
>
> cheers
> Vivek

Subject: Matlab stand-alone applications

From: Jo? Rossa

Date: 3 Sep, 2007 23:10:24

Message: 9 of 13

"Vivek Bannore" <vivek.bannore.nospam@mathworks.com> wrote
in message <f9slgu$71o$1@fred.mathworks.com>...
> M, I think you could try to compile it with your M-file
> with the MCC command just make sure you write the complete
> name like for example
>
> mcc myfile1.m myfile2.m background.fig
>
> Try this and see because in the case of GUIs, the GUI is
> basically a *.fig file and the components on it are
> executed with the help of its corresponding *.m file. And
> when i compiled my files
>
> mcc test.m test.fig
>
> it worked fine and works now too...so it shouldn't be a
> problem at all.... try this...if it doesn't work .... copy
> the error and try compiling without the background.fig and
> then copy it to the root directory where you will execute
> the *.exe so that your M-file will read it then. Either of
> them should work fine....
>
> if not the error you copied earlier, post it here....
>
> cheers
> vivek
>


Hi! i've been trying to create a stand alone matlab
application which uses a TIF image file for scanning and
then plotting over this same image, the thing is everything
seems to be working fine(at least the variable show the
correct values) but its not showing the image, with the
imshow() function, do you know why could this be
happeining?im using the matlab compiler since i do not have
a C/C++ one right now.....

regards,

Subject: Matlab stand-alone applications

From: Drago Zarkovic

Date: 17 May, 2009 22:02:01

Message: 10 of 13

"Titus" <titus.edelhofer@mathworks.de> wrote in message <f9sgne$jo8$1@fred.mathworks.com>...
>
> "Edward Bernhardi" <edwardbernhardi@gmail.com> schrieb im Newsbeitrag
> news:f9sfve$7g2$1@fred.mathworks.com...
> >I see that it is possible to create a stand-alone (exe)
> > file from a matlab m-file.
> >
> > Would it be possible to run this stand-alone exe-file on a
> > computer that doesn't have Matlab (and thus the Matlab
> > compiler) installed?
> >
> > How does this exe-file manage graphics like in the case
> > where the original m-file plotted some graphs to the
> > screen? Would the stand-alone exe-file also plot graphs?
> >
> > Thanks a million
>
> Hi Edward,
> yes it does. What you need to do, is installing the so called
> MCR (MATLAB Component Runtime) on the computer
> without MATLAB. The MCR comes with the compiler and
> you can install it freely on other machines.
>
> Titus
>
>
Hi

Is it posible to compile a stand alone aplication which is not going to need MCR? Somehow to import all needed data in exe file

Thanks in advance
Drago

Subject: Matlab stand-alone applications

From: Bruno Luong

Date: 18 May, 2009 07:05:03

Message: 11 of 13

"Drago Zarkovic" <dragozarkovic@yahoo.com> wrote in message <guq1gp$gfp$1@fred.mathworks.com>...
>
> Is it posible to compile a stand alone aplication which is not going to need MCR? Somehow to import all needed data in exe file

Unfortunately no. Fortunately your can put all the files your application needs in a third party installer.

Bruno

Subject: Matlab stand-alone applications

From: Drago Zarkovic

Date: 18 May, 2009 11:19:02

Message: 12 of 13

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <gur1av$2bs$1@fred.mathworks.com>...
> "Drago Zarkovic" <dragozarkovic@yahoo.com> wrote in message <guq1gp$gfp$1@fred.mathworks.com>...
> >
> > Is it posible to compile a stand alone aplication which is not going to need MCR? Somehow to import all needed data in exe file
>
> Unfortunately no. Fortunately your can put all the files your application needs in a third party installer.
>
> Bruno

Thank you Bruno

But how to do that? Is there any explanation topic about that for newbie? I do understand programing well, but I want to compile my work into stand alone aplication.


Thank you in advance

Subject: Matlab stand-alone applications

From: Bruno Luong

Date: 18 May, 2009 11:39:01

Message: 13 of 13

"Drago Zarkovic" <dragozarkovic@yahoo.com> wrote in message <gurg75$c3b$1@fred.mathworks.com>...

> But how to do that? Is there any explanation topic about that for newbie? I do understand programing well, but I want to compile my work into stand alone aplication.
>

I use the NSIS software. http://nsis.sourceforge.net/Main_Page There is no better explanation than reading the doc, that's how I started.

Bruno

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us