Transpiler between a symbol function or a function handle created with MATLAB and a MeX file written in C++.
Mostrar comentarios más antiguos
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!
Respuestas (2)
ConvexHull
el 26 de Oct. de 2019
0 votos
Walter Roberson
el 27 de Oct. de 2019
0 votos
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.
Categorías
Más información sobre Write C Functions Callable from MATLAB (MEX Files) 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!