Shared Library shrlibsample.c

MATLAB® software includes a sample external library called shrlibsample.c. The library is in the folder matlabroot\extern\examples\shrlib. To see the code, open the fileopen the file in MATLAB Editor. The corresponding header file is shrlibsample.h. To see the code, open this fileopen this file.

To use the shrlibsample library, you first need to either add this folder to your MATLAB path with the command:


or make the folder your current working folder with the command:


The following code loads the library and displays the MATLAB syntax for calling functions in the library:

libfunctions shrlibsample -full

 Functions in shrlibsample Library

Was this topic helpful?