Hey all,
I was trying to write a variable type detection script, so i can know if a variable is a number, matrix, string etc.
Everything was working until i tried num2str matrices.
Most work:
num2str(mat("b",1,1)) =
However, if an entry in the matrix contains a space or other special character, an error occurs.
num2str(mat(" b",1,1)) =
**EDIT UPDATE - The original post stated that only leading spaces would result in an error. This is incorrect. Any space in the matrix entry results in an error.
Any help in this regard is greatly appreciated.
-Pete