mat2str
Matrix to String.
📝Syntax
res = mat2str(M)
res = mat2str(M, 'class')
res = mat2str(M, P, 'class')
📥Input Arguments
Parameter Description
M a numerical 2D matrix or logical.
P an integer value: precision, 15 by default.
📤Output Arguments
Parameter Description
res a string
📄Description

mat2str converts a matrix to a string.

This string may be used to reconstruct the original matrix with execstr function.

💡Examples
R = mat2str(pi)
R = mat2str(pi, 'class')
R = mat2str(pi, 4)
R = mat2str(pi + i, 'class')
execstr(['RB = ', R])
🔗See Also
execstr
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub