Programming and Data Types    

Array/String Conversion

The MATLAB function mat2str changes an array to a string that MATLAB can evaluate. This string is useful input for a function such as eval, which evaluates input strings just as if they were typed at the MATLAB command line.

Create a 2-by-3 array A.

mat2str returns a string that contains the text you would enter to create A at the command line.


  Numeric/String Conversion Multidimensional Arrays