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?

回答 (1 件)

Kaustubha Govind
Kaustubha Govind 2011 年 2 月 28 日

0 投票

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.

カテゴリ

ヘルプ センター および File ExchangeC Shared Library Integration についてさらに検索

質問済み:

2011 年 2 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by