MATLAB: How to fix the error when multiple two matrices

MATLABmatrix

I have two (100*1) matrices. When I multiple them, an error occured "??? Error using ==> mtimes Inner matrix dimensions must agree. Please help me to fix it

Best Answer

Did you mean element-wise multiplication? If so, use the .* operator. E.g.,
a = your 100 x 1 vector
b = your 100 x 1 vector
result = a .* b;