Last change
on this file since 86 was
37,
checked in by (none), 15 years ago
|
Added original make3d
|
-
Property svn:executable set to
*
|
File size:
881 bytes
|
Line | |
---|
1 | function p = wishpdf(varargin)
|
---|
2 | %WISHPDF Wishart probability density function.
|
---|
3 | % WISHPDF(X,A) returns the density at X under a Wishart distribution with
|
---|
4 | % shape parameter A and unit scale parameter.
|
---|
5 | % X is a positive definite matrix and A is scalar.
|
---|
6 | % WISHPDF(X,A,B) specifies the scale parameter of the distribution (a
|
---|
7 | % positive definite matrix with the same size as X).
|
---|
8 | %
|
---|
9 | % The probability density function has the form:
|
---|
10 | % p(X) = |X|^(a-(d+1)/2)*exp(-tr(X*B))*|B|^a/Gamma_d(a)
|
---|
11 | % where Gamma_d is the multivariate Gamma function.
|
---|
12 | %
|
---|
13 | % WISHPDF(X,A,B,'inv') returns the density at X under an inverse Wishart
|
---|
14 | % distribution. The probability density function for an inverse Wishart is:
|
---|
15 | % p(X) = |X|^(-a-(d+1)/2)*exp(-tr(inv(X)*B))*|B|^a/Gamma_d(a)
|
---|
16 |
|
---|
17 | % Written by Tom Minka
|
---|
18 | % (c) Microsoft Corporation. All rights reserved.
|
---|
19 |
|
---|
20 | p = exp(wishpdfln(varargin{:}));
|
---|
Note: See
TracBrowser
for help on using the repository browser.