Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

executable file with Matlab

Status
Not open for further replies.

ahmad_abdulghany

Advanced Member level 4
Joined
Apr 12, 2005
Messages
1,209
Helped
102
Reputation
206
Reaction score
21
Trophy points
1,318
Location
San Jose, California, USA
Activity points
11,775
exe , matlab

Hi all
I hope you all are doing well,

I have a small question,
How can i convert a matlab program/function into an exe file?? Please give example(s) for illustration.

Thanks in advance,
Ahmad,
 

ghbolivar

Full Member level 1
Joined
Jul 25, 2001
Messages
98
Helped
7
Reputation
14
Reaction score
0
Trophy points
1,286
Activity points
764
matlab exe mcc

use matlab compiler toolbox

enjoy
 

hr_rezaee

Advanced Member level 3
Joined
Oct 6, 2004
Messages
751
Helped
109
Reputation
218
Reaction score
24
Trophy points
1,298
Location
Iran-Mashhad
Activity points
4,025
convert m file to exe matlab

you can use matlab compiler toolbox but exe file need matlab runtime for execution. there for i offer you that don't use it.
 

karim.elmahdy

Junior Member level 2
Joined
Dec 2, 2005
Messages
22
Helped
7
Reputation
14
Reaction score
2
Trophy points
1,283
Activity points
1,595
how to convert matlab file to exe

you can change it to a standalone application by running the command
mcc -m filename

where filename is the name of the .m file that you want to convert to an application. type
hlp mcc

for more information about it.

hope i had have helped enough.
yours.
 

dspman

Member level 2
Joined
Mar 14, 2004
Messages
42
Helped
5
Reputation
10
Reaction score
1
Trophy points
1,288
Location
...
Activity points
336
how to convert matlab file to cpp

hi,

I want to add another point.
Your m-file must be in the form of a function!!
so if you have an m file which is not a function first of all, you have to change it to a function form.

yours.
 

dspman

Member level 2
Joined
Mar 14, 2004
Messages
42
Helped
5
Reputation
10
Reaction score
1
Trophy points
1,288
Location
...
Activity points
336
Code:
>> help mcc

mcc.m not found.


Then, what can i do now??!

Any comment?

This means that you don not have installed matlab compiler. You have to install it inorder to make executable m files! (You have to buy this toolbox)

yours.
 

ahmad_abdulghany

Advanced Member level 4
Joined
Apr 12, 2005
Messages
1,209
Helped
102
Reputation
206
Reaction score
21
Trophy points
1,318
Location
San Jose, California, USA
Activity points
11,775
dspman said:
This means that you don not have installed matlab compiler. You have to install it inorder to make executable m files! (You have to buy this toolbox)

yours.

Okay, should I remove current installation of Matlab and re-install, or i can just modify it? How?

Thanks alot,
Ahmad,
 

karim.elmahdy

Junior Member level 2
Joined
Dec 2, 2005
Messages
22
Helped
7
Reputation
14
Reaction score
2
Trophy points
1,283
Activity points
1,595
no you dont have to remove the current version, but open the installation and choose to costum install the compiler only from the list.
 

ceaser

Advanced Member level 4
Joined
Dec 26, 2005
Messages
112
Helped
13
Reputation
26
Reaction score
5
Trophy points
1,298
Location
Egypt
Activity points
2,681
concerning exe files using matlab

once, i tried to convert a file of matlab contain built in functions (sin and cos)
the exe file can't read it so i must edit the m file to remove any trigenometric functions in the code

concerning matlab

i heared that matlab can convert matlab code to c code
i.e.(convert m files to cpp files)
if so. how
 

dspman

Member level 2
Joined
Mar 14, 2004
Messages
42
Helped
5
Reputation
10
Reaction score
1
Trophy points
1,288
Location
...
Activity points
336
hi,

you are rigth, when matlab tries to convert an m file to an exe file it converts your m-file to a c-file first. the genrated c file is to complex to edit and it uses many matlab functions, header files and libraries that must be added to the complied file.

yours.
 

hr_rezaee

Advanced Member level 3
Joined
Oct 6, 2004
Messages
751
Helped
109
Reputation
218
Reaction score
24
Trophy points
1,298
Location
Iran-Mashhad
Activity points
4,025
If your goal is speed, converting to C is a good way. but if is not, you choose difficult way. MEX file is another way.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top