Pass array pointers in C

I have a MATLAB function y=foo(u, D) where y, u, and D are arrays. I used emlc to create a library of this function. When writing my main.c, how can I pass my array pointers to the function?

Réponses (1)

Kaustubha Govind
Kaustubha Govind le 28 Fév 2011

0 votes

You should be able to pass in numeric array pointers directly (just like you would with any other C shared library). Look at the function prototype in the generated header file, and pass in arguments appropriately. See Calling Generated C/C++ Functions for a simple example with a scalar input. If you need more help, please post the function prototypes for the generated library's entry points.

Catégories

En savoir plus sur MATLAB Coder dans Centre d'aide et File Exchange

Question posée :

le 27 Fév 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by