Using the C Math Library    

Example Without Automated Memory Management

The function Explicit_Mem_Example() performs the same calculations as Automated_Mem_Example() in the previous example. Compare the use of temporary variables, nonnested calls to the MATLAB C Math Library functions, and calls to mxDestroyArray(). It contains twenty-six lines of code compared to Automated_Mem_Example()'s nine lines.


 Example - Managing Array Memory (ex2.c) Restrictions