C++ code generation function pointer as input.

2 ビュー (過去 30 日間)
Peter B
Peter B 2016 年 3 月 31 日
I been trying to read the documentation for matlab coder and use of functions and function_handles, and come up short with a definitive answer, if its possible or not to do what i had in mind. Below is a simple example of what i'm trying to do in matlab.
function TestLogHandler( input )
input %output to console.
end
function CoderFunction(pLogHandler)
pLogHandler('Some log text');
end
TestScript:
CoderFunction(@TestLogHandler)
What i wish to accomplish is to create a entry function using matlab coder that takes a function pointer to a loghandler that takes a char* or MArray as input.
Is this in any ways possible, or is my only option to add a return value containing my log information ?

回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Coder についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by