Continue to Site

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.

How do I convert my MATLAB files to C?

Status
Not open for further replies.

cwjcwjcwj

Full Member level 5
Joined
Nov 8, 2004
Messages
273
Helped
17
Reputation
34
Reaction score
12
Trophy points
1,298
Activity points
1,714
Is there anyone here know how to convert MATLAB files(*.m) with functions to C and run it on Ms. Visual Studio?Or any good information or website?Thanks.
 

Hi MATLAB has a C CODE GENERATOR .you can export some c code ..But don't expecto to see FULL BLOWN C code ..The reason is that MATLAB is written in C++
and some functions are highly optimized so they won't release the CODE
insted they will give you a lib to LINK ..
 

Thanks for your advice.Do you have any good information to read so that I can learn how to convert it by myself.
 

I thnk the command is mcc . Type "help mcc" in the command window of matlab.. This might help
 

help mcc?It doesn't work. Is there any others?Thanks
 

The command "help mcc" invokes help information about
Matlab Compiler. If this command doesn't work it
means that you haven't installed the Matlab Compiler
product. And if you haven't installed Matlab Compiler
you are not able to produce C/C++ code from your
Matlab m-files code.
 

Dear Member

I recently learned the same thing u r asking now. Well to start with if u want to convert Matlab Code to C u ll have to use matlab 6.5 and not MAtlab 7. Matlab 7 does not convert the code to c. That decided the easiet way is to

1. Install Matlab 6.5 R13
2. Install Microsoft Visual Studio 6.0
3. Configure "Matlab Visual Addon"

You can do that by following instructions at

h**p://www.mathworks.com/support/solutions/data/1-18L04.html?solution=1-18L04

Once this addon is configured u can simply open up visual studio and can make a new project with Matlab files.

P.S Please note that this conversion can only take place if ur matlab file is a function, complete fucntion. Script files or script files containg functions are not converted in to C.

Hope it helps

Just in case u come across some problem pls let me know n i ll try to help

Regards
Ess ESS
 

hi, why doesn't matlab 7 let you convert to c,,, why would they take away such a good feature,, ??? just curious
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top