Final changes to matlab code include basic svd