MATLAB with problem code