Changes made to the indices so that they give the correct results when compared to MATLAB. MATLAB index starts at 1 while C starts at 0. Getting the correct cor matrix values