If you (by accident) enter a character array in an array indexing and it returns values not an error. It turns out that MATLAB converts characters to ASCII codes, use them as integer indices, and returns the values. For example:
X = rand(1,100);X('A') == X(65)
I think this is just confusing, useless, and potentially risky. Does anyone know a good reason why MATLAB even supports this?
Best Answer