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.

Is there anyone here familliar with Matlab and 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 familiar about mex files in matlab or c?can you pls e-mail me?
my email is

kbkien@yahoo.com

thanks!
 

What is your problem, may I ask?

regards,
joshuashi
 

Just wondering how to link a multidimension array from matlab to c via mex files.....
 

cwjcwjcwj said:
Just wondering how to link a multidimension array from matlab to c via mex files.....

I guess what you said is that in a C file you want to use data in a matlab array, right?

If you want to setup a mex file for this purpose, you need a gateway function:

void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])

in this mexFunction, you can extract the data from matlab array via some interface functions like mxGet* to get array dimension and starting address etc.
Once you have the starting address, you can access any other element in the array.

See matlab help: External Interfaces Referenc for details.

hope it be helpful.

joshuashi
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top