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:
import C file to matlab

Subject: import C file to matlab

From: mahdi roozbhani

Date: 15 Dec, 2010 02:48:05

Message: 1 of 7

how can I import C file to matlab ?

Subject: import C file to matlab

From: James Tursa

Date: 15 Dec, 2010 04:09:04

Message: 2 of 7

"mahdi roozbhani" <m.m.roozbahani@gmail.com> wrote in message <ie9a95$da1$1@fred.mathworks.com>...
> how can I import C file to matlab ?

Please be more specific. Convert C code to m-code? Run C code from MATLAB? Import a file written by a C program into MATLAB? What are you trying to do?

James Tursa

Subject: import C file to matlab

From: mahdi roozbhani

Date: 15 Dec, 2010 04:33:05

Message: 3 of 7

"James Tursa" <aclassyguy_with_a_k_not_a_c@hotmail.com> wrote in message <ie9f10$k2r$1@fred.mathworks.com>...
> "mahdi roozbhani" <m.m.roozbahani@gmail.com> wrote in message <ie9a95$da1$1@fred.mathworks.com>...
> > how can I import C file to matlab ?
>
> Please be more specific. Convert C code to m-code? Run C code from MATLAB? Import a file written by a C program into MATLAB? What are you trying to do?
>
> James Tursa




=====> my friend, I am not familiar with C language and I have a code in C language from my advisor and I want to convert or import it into matlab, how can I do it? what is your opinion ?

Subject: import C file to matlab

From: Rune Allnor

Date: 15 Dec, 2010 05:43:42

Message: 4 of 7

On Dec 15, 5:33 am, "mahdi roozbhani" <m.m.roozbah...@gmail.com>
wrote:
> "James Tursa" <aclassyguy_with_a_k_not_...@hotmail.com> wrote in message <ie9f10$k2...@fred.mathworks.com>...
> > "mahdi roozbhani" <m.m.roozbah...@gmail.com> wrote in message <ie9a95$da...@fred.mathworks.com>...
> > > how can I import C file to matlab ?
>
> > Please be more specific. Convert C code to m-code? Run C code from MATLAB? Import a file written by a C program into MATLAB? What are you trying to do?
>
> > James Tursa
>
> =====> my friend, I am not familiar with C language and I have a code in C language from my advisor and I want to convert or import it into matlab, how can I do it? what is your opinion ?

1) Ask your advisor what he wants you to do with the code
2) Find out how to do what your advisor wants
3) Do it

Rune

Subject: import C file to matlab

From: gmish27

Date: 17 May, 2011 06:12:03

Message: 5 of 7

the question is how to implement an algorithm written in a c/c++ code in matlab??? If the code has been written in c/c++ then how can the same b implemented in matlab without writing another .m file for implementing the same algo

Subject: import C file to matlab

From: Steven_Lord

Date: 17 May, 2011 13:54:38

Message: 6 of 7



"gmish27 " <mishragaurav27@gmail.com> wrote in message
news:iqt3jj$d9o$1@newscl01ah.mathworks.com...
> the question is how to implement an algorithm written in a c/c++ code in
> matlab??? If the code has been written in c/c++ then how can the same b
> implemented in matlab without writing another .m file for implementing the
> same algo

If you're just looking to run your C/C++ code in MATLAB, create a MEX-file.

http://www.mathworks.com/help/techdoc/matlab_external/bp_kqh7.html

If you're looking for some "automatic converter" that takes your C/C++ code
and spits out MATLAB code, I dont know of any such program.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: import C file to matlab

From: vasant madabhanvi

Date: 7 Mar, 2013 13:12:08

Message: 7 of 7

"mahdi roozbhani" <m.m.roozbahani@gmail.com> wrote in message <ie9a95$da1$1@fred.mathworks.com>...
> how can I import C file to matlab ?

Tags for this Thread

No tags are associated with 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