MATLAB Answers

manoj saini

how run .c program in matlab

Asked by manoj saini
on 29 Jan 2013

if i have program print.c #include<stdio.h> #include<conio.h> main() {


how i can run this code in MATLAB



No products are associated with this question.

1 Answer

Answer by Shashank Prasanna
on 29 Jan 2013
 Accepted answer

If you want to call your C function from within MATLAB you have to create a MEX file. Which mean you will have to modify your C code with the following guidelines:

  1 Comment

Titus Edelhofer
on 29 Jan 2013

Or compile your C code in your favourite C programming environment into a dll/shared object and use loadlibrary to run it inside MATLAB.

Discover MakerZone

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

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!