Add4DMat

Declaration: TMatlab5WorkSpace.Add4DMat (MatrixName: string; DataArr: TDouble4DArray): integer;
The function Add4DMat adds the four-dimensional array DataArr to the workspace using the name MatrixName for it. The name of the array has to start with a letter and may contain numbers or underscores but no other characters (names are case sensitive). The function returns the (positive) index of the new matrix, if the call to Add4DMat was successful:

The function returns the following error codes:

>0 ... everything OK, returned number is the index of the new matrix
-1 ... the MatrixName must not be empty
-2 ... the data array is empty
-3 ... invalid MatrixName (wrong format)
-4 ... MatrixName is already in use