How to perform matrix operations in MATLAB