asserts.squareMatrix
Check that a value is a square matrix.
📝Syntax
asserts.squareMatrix(value)
[res, msg] = asserts.squareMatrix(value)
📥Input Arguments
Parameter Description
value Value to test.
📤Output Arguments
Parameter Description
res true if the assertion passes, false otherwise.
msg assertion failure message, empty on success.
📄Description

The assertion passes when value has two equal matrix dimensions.

Diagnostics report the computed class and dimensions.

💡Examples
Square matrix
asserts.squareMatrix(ones(2, 2));
Capture a shape failure
[res, msg] = asserts.squareMatrix(ones(2, 3));
🔗See Also
asserts.matrix
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub