File Exchange

image thumbnail

Matrix2M

version 1.0 (3.15 KB) by

Outputs the m-file commands necessary to recreate a matrix, useful to include constants in m-files.

0 Downloads

Updated

No License

This function takes a variable name, collects its contents from the base workspace and outputs (to the clipboard and the variable OutputCharMatrix) the m-code necessary for MATLAB to re-create the variable, including the variable name.
This is useful for including matrices of constants in m-files.

Accepts full or sparse matrices of real or complex numeric values.

For small 2D matrices, try mat2str instead.
Example:
a=rand(3,3,3);
Matrix2M('a')

Comments and Ratings (1)

Victor Zakharov

strange2return in program

MATLAB Release
MATLAB 7 (R14)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video