Closed
Description
Iam trying to use the wishart PDF as prior on the covariance matrix , i used the code bellow
nu= degree of freedom and its = 8 ,
W= cov matrix ,
S represent scaler
function f = WishartPDF(W,nu,S)
N=size(W,1);
Arg=[nu-N+1:nu];
K=2^(nu*N/2)*pi^(N*(N-1)/4)*prod(gamma(Arg/2));
f = 1/K * (det(S))^(-nu/2)*(det(W))^((nu-N-1)/2)*exp(-1/2*trace(inv(S)*W));
end
but iam receiving error ?
Metadata
Metadata
Assignees
Labels
No labels