annotate toolboxes/FullBNT-1.0.7/bnt/potentials/@cpot/cpot.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 function pot = cpot(members, sizes, g, h, K)
wolffd@0 2 % CPOT Make a canonical Gaussian potential.
wolffd@0 3 % pot = cpot(members, sizes, g, h, K)
wolffd@0 4 %
wolffd@0 5 % All params default to 0 if omitted.
wolffd@0 6
wolffd@0 7 n = sum(sizes);
wolffd@0 8 if nargin < 3, g = 0; end
wolffd@0 9 if nargin < 4, h = zeros(n,1); end
wolffd@0 10 if nargin < 5, K = zeros(n,n); end
wolffd@0 11
wolffd@0 12 pot.domain = members;
wolffd@0 13 pot.sizes = sizes(:)';
wolffd@0 14 pot.g = g;
wolffd@0 15 pot.h = h;
wolffd@0 16 pot.K = K;
wolffd@0 17 pot = class(pot, 'cpot');