Build Interface
Validate Edits to Library Definition File
In the previous step, you modified the library definition file
definematrixlib.m
. To verify the MATLAB® statements, validate the file and fix any reported errors in the file.
definematrixlib;
View Functionality
If you defined all constructs in the definition file in the previous step, then the
summary
function
shows the complete library. In some cases, you might not define everything. Use
summary
to review the library. If you need to make changes, return to
the previous step to edit definematrixlib
.
summary(definematrixlib)
MATLAB Interface to matrixlib Library Class clib.matrixlib.Mat Constructors: clib.matrixlib.Mat(clib.matrixlib.Mat) clib.matrixlib.Mat() Methods: setMat(clib.array.matrixlib.Int) int32 getMat(uint64) uint64 getLength() copyMat(clib.array.matrixlib.Int) No Properties defined Functions int32 clib.matrixlib.addMat(clib.matrixlib.Mat) clib.matrixlib.updateMatByX(clib.matrixlib.Mat,int32) clib.matrixlib.updateMatBySize(clib.matrixlib.Mat,clib.array.matrixlib.Int)
Build Interface and Add to MATLAB Path
Build the matrixlib
interface to the library.
build(definematrixlib)
Building interface file 'matrixlibInterface.so' for clib package 'matrixlib'. Interface file 'matrixlibInterface.so' built in folder '/home/Documents/MATLAB/matrixlib'. To use the library, add the interface file folder to the MATLAB path. addpath('/home/Documents/MATLAB/matrixlib')
Either click the addpath
link in the message or type:
addpath('matrixlib')
Note
You can repeat the generate, define, and build steps. However, once you display help
for or call functions in the library, you cannot update the
definematrixlib
definition file in the same MATLAB session. Either restart MATLAB or create a new definition file by using the PackageName
name-value argument for the clibgen.generateLibraryDefinition
function.
To call functions in the library, continue with the next step.