Matrix2M

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

Al momento, stai seguendo questo contributo

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')

Cita come

Thorwald van Vuure (2026). Matrix2M (https://it.mathworks.com/matlabcentral/fileexchange/8933-matrix2m), MATLAB Central File Exchange. Recuperato .

Categorie

Scopri di più su General Physics in Help Center e MATLAB Answers

Informazioni generali

Compatibilità della release di MATLAB

  • Compatibile con qualsiasi release

Compatibilità della piattaforma

  • Windows
  • macOS
  • Linux
Versione Pubblicato Note della release Action
1.0.0.0