Matlab code for college