Matlab
square
determine whether a MapleMatrix or MatlabMatrix is square
Calling Sequence
Parameters
Description
Examples
square(X)
X
-
MapleMatrix or MatlabMatrix
The square command returns a value of 'true' if X is a square matrix. All constants are considered to be one-by-one square matrices.
A cubic matrix is not square. A square matrix can have at most two dimensions.
Executing the square command returns a value of either 'true' or 'false'.
Setting a Maple matrix in MATLAB®.
with⁡Matlab:
maplematrix_a≔Matrix⁡1,2,3,3,4,5
maplematrix_a≔123345
maplematrix_b≔Matrix⁡8,7,6,3,2,1
maplematrix_b≔876321
Determine whether these matrices are square.
Matlabsquare⁡maplematrix_a
false
Matlabsquare⁡maplematrix_b
The matrices are set in the MATLAB® session
setvar⁡matlabmatrix_a,maplematrix_a
setvar⁡matlabmatrix_b,maplematrix_b
The product of maplematrix_a*maplematrix_b is computed in MATLAB® and the result is assigned to matlabmatrix_c. Determine whether the new MatlabMatrix is square.
MatlabevalM⁡matlabmatrix_c=matlabmatrix_a*matlabmatrix_b
Matlabsquare⁡matlabmatrix_c
true
See Also
dot
LinearAlgebra[Dimension]
Matlab[dimensions]
Matlab[size]
MatlabMatrix
Download Help Document