Pass array pointers in C
Mostrar comentarios más antiguos
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?
Respuestas (1)
Kaustubha Govind
el 28 de Feb. de 2011
0 votos
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.
Categorías
Más información sobre C Shared Library Integration en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!