MATLAB: Can MATLAB show the dimensions of matrices when outputting a dimension mismatch error

MATLAB

Can MATLAB show the dimensions of matrices when outputting a dimension mismatch error?
 

Best Answer

MATLAB currently has no feature to output the dimensions of incompatible matrices whose operator triggers a dimension mismatch error.  The following error message cannot be generated by MATLAB:
>> A = ones(88, 32);
>> B = ones(33, 99);
>> X = A*B;
Error using  * 
Inner matrix dimensions must agree.
A has a dimension of (r1, c1) = (88, 32)
B has a dimension of (r2, c2) = (33, 99)
c1 must be equal to r2
Instead, the following error message is standard:
>> A = ones(88, 32);
>> B = ones(33, 99);
>> X = A*B;
Error using  * 
Inner matrix dimensions must agree.