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:
how to run my c program on matlab?

Subject: how to run my c program on matlab?

From: yaya

Date: 30 Mar, 2013 18:25:10

Message: 1 of 3

i have a parallel c program (quicksort) . i have used the mpi functions in c to
make it parallel.

now i want to run my code on matlab and using the parallel environment of matlab
so i am wondering how can i convert/import my code into matlab ?

Subject: how to run my c program on matlab?

From: Bruno Luong

Date: 30 Mar, 2013 19:55:06

Message: 2 of 3

"yaya " <saghi9932@yahoo.com> wrote in message <kj7am6$mg0$1@newscl01ah.mathworks.com>...
> i have a parallel c program (quicksort) . i have used the mpi functions in c to
> make it parallel.
>
> now i want to run my code on matlab and using the parallel environment of matlab
> so i am wondering how can i convert/import my code into matlab ?

Please take a look at "Mex" programming.

Bruno

Subject: how to run my c program on matlab?

From: Steven_Lord

Date: 1 Apr, 2013 15:02:28

Message: 3 of 3



"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message
news:kj7fuq$6jr$1@newscl01ah.mathworks.com...
> "yaya " <saghi9932@yahoo.com> wrote in message
> <kj7am6$mg0$1@newscl01ah.mathworks.com>...
>> i have a parallel c program (quicksort) . i have used the mpi functions
>> in c to make it parallel.
>>
>> now i want to run my code on matlab and using the parallel environment of
>> matlab
>> so i am wondering how can i convert/import my code into matlab ?
>
> Please take a look at "Mex" programming.

MEX isn't going to use "the parallel environment of matlab" so I'm not sure
if it suits the OP's requirements.

To the OP: use the SYSTEM function to invoke an application generated from
your parallel C code, look at the documentation for Parallel Computing
Toolbox, or (if your data set is large enough) just use the SORT function
included as part of MATLAB. The SORT function is multithreaded when it makes
sense (for large enough data sets.)

http://www.mathworks.com/support/solutions/en/data/1-4PG4AN/index.html?solution=1-4PG4AN

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

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