Transpiler between a symbol function or a function handle created with MATLAB and a MeX file written in C++.

1 回表示 (過去 30 日間)
Dear all,
i want to use the symbolic Toolbox for some Algebra, e.g. derivatives or integrals of some functions, and want to use it in a MeX source file written in C++. Is there an easy way to pipe a symbol function or a function handle to a Mex source code, e.g. with fprintf, which is compilable.
Thank you for your help!

回答 (2 件)

ConvexHull
ConvexHull 2019 年 10 月 26 日
Similar question:
Is Matlab Coder accessible from workspace or from a m-file?

Walter Roberson
Walter Roberson 2019 年 10 月 27 日
Use matlabFunction with the 'file' option, and then do code generation from the resulting .m file.
Caution: if the function involves int() or piecewise() then the generated code is not vectorized on all inputs.

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by