comparison toolboxes/FullBNT-1.0.7/bnt/potentials/@cgpot/multiply_pots.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 T = multiply_pots(T1, T2)
2 % MULTIPLY_POTS Multiply a pair of dpots together pointwise (cgpot)
3 % T = multiply_pots(pots)
4
5 ddom = myunion(T1.ddom, T2.ddom);
6 cdom = myunion(T1.cdom, T2.cdom);
7 dom = myunion(ddom, cdom);
8 ns = zeros(1, max(dom));
9 ns(T1.ddom) = T1.dsizes;
10 ns(T2.ddom) = T2.dsizes;
11 ns(T1.cdom) = T1.csizes;
12 ns(T2.cdom) = T2.csizes;
13
14 T = cgpot(ddom, cdom, ns);
15 T = multiply_by_pot(T, T1);
16 T = multiply_by_pot(T, T2);