フィルターのクリア

Can I use a Matlab function as a callback of a C library when using loadlibrary and calllib ?

5 ビュー (過去 30 日間)
Thierry Mazoyer
Thierry Mazoyer 2023 年 10 月 26 日
回答済み: Bruno Luong 2023 年 10 月 26 日
Hi
I am using a C library in Matlab with loadlibrary and calllib.
In my C program, I refer to a callback function defined by an argument of a "setup" function (here named OnTime).
Can I pass a Matlab function to be used as this call back and how ?
(For information, loadlibrary gives me the following warning: Warning: The data type 'FcnPtr' used by function OnTime does not exist.)
Thanks in advance for your help.
Regards

回答 (1 件)

Bruno Luong
Bruno Luong 2023 年 10 月 26 日
No MATLAB function are propritary and cannot directly inferfacing with anything (else). You have to wrap it in appropiate interface function of whatever language (C in your case).

カテゴリ

Help Center および File ExchangeC Shared Library Integration についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by