Hi,
In the second homework assignment, est_tps had a parameter lambda that was added to the diagonal of the [K P; P' 0] matrix you had constructed. A better regularization (one that will work with larger lambda) would be to only add to the diagonal of the K portion of that matrix. This would mean that instead of adding lamda*eye(n+3), you would set the last 3 diagonal elements of eye(n+3) to 0.
This is a fairly simple change you'll probably want to make if you reuse your TPS code in the final project with a non-zero lambda.
Andrew