External Interfaces | ![]() ![]() |
Getting Information About the Library
You can use either of two functions to get information on the functions available in a library that you have loaded:
The main difference is that libfunctions
displays the information in the MATLAB Command Window (and you can assign its output to a variable), and libfunctionsview
displays the information as a graphical display in a new window.
To see what functions are available in the libmx
library, use libfunctions
, specifying the library filename as the only argument. Note that you can use the MATLAB command syntax (with no parentheses or quotes required) when specifying no output variables:
libfunctions libmx Methods for class lib.libmx: mxAddField mxGetFieldNumber mxIsLogicalScalarTrue mxArrayToString mxGetImagData mxIsNaN mxCalcSingleSubscript mxGetInf mxIsNumeric mxCalloc mxGetIr mxIsObject mxClearScalarDoubleFlag mxGetJc mxIsOpaque mxCreateCellArray mxGetLogicals mxIsScalarDoubleFlagSet . . . . . .
To list the functions along with their signatures, use the -full
switch with libfunctions
. This shows the MATLAB syntax for calling functions written in C. The data types used in the argument lists and return values match MATLAB types, not C types. See the section Data Conversion for more information on these data types.
libfunctions libmx -full Methods for class lib.libmx: [mxClassID, MATLAB array] mxGetClassID(MATLAB array) [lib.pointer, MATLAB array] mxGetData(MATLAB array) [MATLAB array, voidPtr] mxSetData(MATLAB array, voidPtr) [lib.pointer, MATLAB array] mxGetPr(MATLAB array) [MATLAB array, doublePtr] mxSetPr(MATLAB array, doublePtr) uint8 mxIsFinite(double) uint8 mxIsInf(double) . .
Viewing Functions in a GUI Interface
The libfunctionsview
function creates a new window that displays all of the functions defined in a specific library. For each method, the following information is shown.
Heading |
Description |
Return Type |
Data types that the method returns |
Name |
Function name |
Arguments |
Valid data types for input arguments |
Inherited From |
Not relevant for shared library functions |
The following command opens the window shown below for the libmx
library:
As was true for the libfunctions
function, the data types displayed here are MATLAB types. See the section Data Conversion for more information on these data types.
![]() | Loading and Unloading the Library | Invoking Library Functions | ![]() |
© 1994-2005 The MathWorks, Inc.