Download this file
1 2 3
function P = trainP(Dic, numberOfSamples, param) P = inv(Dic' * Dic + param.lambda * eye(numberOfSamples)) * Dic';