External Interfaces/API    

Dynamically Allocating Memory

It is possible to allocate memory dynamically in a Fortran MEX-file, but you must use %val to do it. This example takes an input matrix of real data and doubles each of its elements.

For an input 2-by-3 matrix

typing

yields


 Handling Complex Data Handling Sparse Matrices