about summary refs log tree commit diff
path: root/sourcecodes/bnt-master/BNT/CPDs/@gaussian_CPD/get_field.m
blob: 2a50e1ac857e7d26f97cdfedb464a4045e125ba8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function val = get_params(CPD, name)
% GET_PARAMS Get the parameters (fields) for a gaussian_CPD object
% val = get_params(CPD, name)
%
% The following fields can be accessed
%
% mean       - mu(:,i) is the mean given Q=i
% cov        - Sigma(:,:,i) is the covariance given Q=i 
% weights    - W(:,:,i) is the regression matrix given Q=i 
%
% e.g., mean = get_params(CPD, 'mean')

switch name
 case 'mean',      val = CPD.mean;
 case 'cov',       val = CPD.cov;
 case 'weights',   val = CPD.weights;
 otherwise,
  error(['invalid argument name ' name]);
end