Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>As mentioned previously by answerers, you can call a live copy of MATLAB from C via the <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/matlab_external/f38569.html&amp;http://www.mathworks.com/access/helpdesk/help/techdoc/helptoc.html" rel="nofollow noreferrer" title="MATLAB Engine">MATLAB Engine</a> interface.</p> <p>If the end-product needs to be used where there is no live copy of MATLAB, you can deploy the application using <a href="http://www.mathworks.com/products/compiler/" rel="nofollow noreferrer" title="MATLAB Compiler">MATLAB Compiler</a>. However, MATLAB Compiler does not, as another answer has suggested, convert MATLAB programs into C code (and hasn't done for a few versions now). Instead, it archives and encrypts your MATLAB program, and packages it into an executable or shared library that executes against the MATLAB Compiler Runtime (shareable royalty-free). The executable or shared library can then be called from C.</p> <p>Alternatively you could go the other way around, and call your C code from MATLAB, using either <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/loadlibrary.html" rel="nofollow noreferrer" title="loadlibrary">loadlibrary</a> or MATLAB's <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/matlab_external/bp_kqh7.html" rel="nofollow noreferrer" title="MEX interface">MEX interface</a>.</p> <p>Update: As of release R2011a, you can also use <a href="http://www.mathworks.com/products/matlab-coder" rel="nofollow noreferrer">MATLAB Coder</a> to generate C code directly from a subset of the MATLAB language.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload