comparison toolboxes/FullBNT-1.0.7/bnt/potentials/@upot/upot.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
comparison
equal deleted inserted replaced
-1:000000000000 0:cc4b1211e677
1 function pot = upot(domain, sizes, p, u)
2 % UPOT Make a discrete utility potential.
3 % pot = upot(domain, sizes, p, u)
4 %
5 % sizes(i) is the size of the i'th domain element.
6 % p defaults to all 1s, u defaults to all 0s.
7
8 if nargin < 3, p = myones(sizes); end
9 if nargin < 4, u = 0*myones(sizes); end
10
11 pot.domain = domain;
12 pot.p = myreshape(p, sizes);
13 pot.u = myreshape(u, sizes);
14 pot.sizes = sizes(:)';
15 pot = class(pot, 'upot');