Use dsp = norm(ds(n+1:end)) / norm(ds) instead of the sum.
This is because in norm(U*S*V', 'fro'), you can move U and V outside of the norm since they are orthogonal, leaving you with norm(S, 'fro'), and since S is diagonal, this is equal to norm(diag(S)).