my MATLAB code