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.

C file to Matlab file

Status
Not open for further replies.

tojeena

Member level 3
Member level 3
Joined
Jan 24, 2013
Messages
55
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Visit site
Activity points
1,570
I am having C files including .h files for a particular project.How to call these functions in matlab?I would like to run this C file in matlab.Kindly enlighten.
 

You can run C files in MATLAB by changing them into mex files:

https://www.mathworks.com/help/matlab/ref/mex.html

You first need to set up the mex environment in MATLAB; that link should have the relevant information. You also have to put your C files into a very specific format to have matlab mex compile them properly.
 

Thank you for your reply.Should i give matlab commands for the .c file .Like c codes will be displayed as .m files right or is this just giving a link to run?Kindly help me.
 

Not sure I understand your question, but MATLAB does have the right color-coding for .c files. You need to run anything you would run in C though by first making a new C file and then editing it, then compiling it into a mex file and then running it. the extension on mex files is .mex, which is the output of the mex compiler.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top