Define Missing Constructs
When you created the library definition file to the matrixOperations
library in the previous step, MATLAB® reported that five constructs are partially defined. To completely define the
functionality, edit the definematrixlib.mlx
file. If you have not yet
opened the file, you can click the link in the output message to open it in Live
Editor.
Definition file definematrixlib.mlx contains definitions for 10 constructs supported by MATLAB. - 5 construct(s) are fully defined. - 5 construct(s) partially defined and commented out. To include the 5 undefined construct(s) in the interface, uncomment and complete the definitions in definematrixlib.mlx. To build the interface, call build(definematrixlib).
Scroll through the library definition file open in your editor to find blocks of commented code for these constructs.
MATLAB cannot automatically determine the size of arguments used by these functions.
setMat
- C++ method for classMat
getMat
- C++ method for classMat
copyMat
- C++ method for classMat
addMat
- C++ package functionupdateMatBySize
- C++ package function
Based on the documentation of the matrixOperations
library, you can
provide values for <SHAPE>
in the argument definition statements.
For more information, see Define Missing SHAPE Parameter.
For each construct, uncomment the statements defining it.
Replace
<SHAPE>
arguments with these values.Construct
Argument Name
Argument C++ Definition
Description
Replace
<SHAPE>
with ValuesetMat
src
int [] src
The length of the matrix is defined by the input argument
len
."len"
getMat
RetVal
int const *
The length of the output argument is defined by the input argument
len
."len"
copyMat
dest
int * dest
The length
dest
is defined by the input argumentlen
."len"
addMat
mat
Mat const * mat
The function takes a single
mat
argument.1
updateMatBySize
arr
int * arr
The length
arr
is defined by the input argumentlen
."len"
Save and close the definition file.
Continue with the next step.