How to call MATLAB code from C?

Lazer picture Lazer · Oct 3, 2009 · Viewed 13k times · Source

I have some code that plots triangles in MATLAB.

I need to be able to somehow execute this code from my C program which generates these points.

Is that possible? How can it be done?

Just a thought: Can I somehow embed MATLAB code in C, so that it can compile on a C compiler?

Answer

Pete Kirkham picture Pete Kirkham · Oct 3, 2009

The Mathworks site has full details; a demo video of calling the Matlab engine from C, and also the Matlab to C Compiler.