Mercurial > hg > camir-ismir2012
annotate toolboxes/FullBNT-1.0.7/bnt/potentials/@cpot/cpot.m @ 0:cc4b1211e677 tip
initial commit to HG from
Changeset:
646 (e263d8a21543) added further path and more save "camirversion.m"
author | Daniel Wolff |
---|---|
date | Fri, 19 Aug 2016 13:07:06 +0200 |
parents | |
children |
rev | line source |
---|---|
Daniel@0 | 1 function pot = cpot(members, sizes, g, h, K) |
Daniel@0 | 2 % CPOT Make a canonical Gaussian potential. |
Daniel@0 | 3 % pot = cpot(members, sizes, g, h, K) |
Daniel@0 | 4 % |
Daniel@0 | 5 % All params default to 0 if omitted. |
Daniel@0 | 6 |
Daniel@0 | 7 n = sum(sizes); |
Daniel@0 | 8 if nargin < 3, g = 0; end |
Daniel@0 | 9 if nargin < 4, h = zeros(n,1); end |
Daniel@0 | 10 if nargin < 5, K = zeros(n,n); end |
Daniel@0 | 11 |
Daniel@0 | 12 pot.domain = members; |
Daniel@0 | 13 pot.sizes = sizes(:)'; |
Daniel@0 | 14 pot.g = g; |
Daniel@0 | 15 pot.h = h; |
Daniel@0 | 16 pot.K = K; |
Daniel@0 | 17 pot = class(pot, 'cpot'); |