correlation MATLAB code