matlab c++ data arrays to c++
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
how i can transfer arrays that i save from matlab to call it and use it in c++ code
3 comentarios
Jan
el 13 de Feb. de 2022
You can either write a Mex function to call the C++ routine directly without the indirection over the hard disk. Or you can save the data to a binary file using fopen/fwrite/fclose.
Respuestas (1)
Akshat Dalal
el 12 de Mayo de 2025
Hi Mohammed,
There are a few different ways to achieve this as Jan mentioned. I would also suggest a few other ways:
- Using MATLAB Engine APIs to interface with C++ code: https://www.mathworks.com/help/matlab/matlab_external/pass-variables-from-matlab-to-c.html
- Using coder.ceval to call C++ code and passing arguments via coder.rref: https://www.mathworks.com/help/simulink/slref/coder.rref.html
I hope this helps!
0 comentarios
Ver también
Categorías
Más información sobre Call C++ from MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!