MATLAB: Matrix dimensions must agree.

MATLABmatrix multiplicationmtimes

How do I multiply a 2×101 matrix with a 101×101 matrix??
I tried everything, it gives me the above error every time.
Please help,
Thanks, Rohan

Best Answer

>> A = rand(2,101); B = rand(101,101); size(A*B)
ans =
2 101