comparison toolboxes/FullBNT-1.0.7/bnt/CPDs/@gaussian_CPD/get_field.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
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