To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / _FullBNT / BNT / CPDs / @gaussian_CPD / get_field.m @ 8:b5b38998ef3b
History | View | Annotate | Download (558 Bytes)
| 1 |
function val = get_params(CPD, name) |
|---|---|
| 2 |
% GET_PARAMS Get the parameters (fields) for a gaussian_CPD object |
| 3 |
% val = get_params(CPD, name) |
| 4 |
% |
| 5 |
% The following fields can be accessed |
| 6 |
% |
| 7 |
% mean - mu(:,i) is the mean given Q=i |
| 8 |
% cov - Sigma(:,:,i) is the covariance given Q=i |
| 9 |
% weights - W(:,:,i) is the regression matrix given Q=i |
| 10 |
% |
| 11 |
% e.g., mean = get_params(CPD, 'mean') |
| 12 |
|
| 13 |
switch name |
| 14 |
case 'mean', val = CPD.mean; |
| 15 |
case 'cov', val = CPD.cov; |
| 16 |
case 'weights', val = CPD.weights; |
| 17 |
otherwise, |
| 18 |
error(['invalid argument name ' name]); |
| 19 |
end |