Using Data Types
You can write MEX-files, MAT-file applications, and engine applications in C that accept any data type supported by MATLAB. In Fortran, only the creation of double-precision n-by-m arrays and strings are supported. You can treat C and Fortran MEX-files, once compiled, exactly like M-functions.
MATLAB does not check the validity of MATLAB data structures created in C or Fortran using one of the |
The explore Example
There is an example MEX-file included with MATLAB, called
explore, that identifies the data type of an input variable. The source file for this example is in the
<matlab>/extern/examples/mex directory, where
<matlab> represents the top-level directory where MATLAB is installed on your system.
In platform independent discussions that refer to directory paths, this book uses the UNIX convention. For example, a general reference to the |
For example, typing
produces this result
explore accepts any data type. Try using
explore with these examples.
|Data Types in MATLAB||Building MEX-Files|
© 1994-2005 The MathWorks, Inc.