fixed some silly errors, still DDS has onlt half the number of nonzeros as matlab