annotate 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
rev   line source
wolffd@0 1 function T = multiply_pots(T1, T2)
wolffd@0 2 % MULTIPLY_POTS Multiply a pair of dpots together pointwise (cgpot)
wolffd@0 3 % T = multiply_pots(pots)
wolffd@0 4
wolffd@0 5 ddom = myunion(T1.ddom, T2.ddom);
wolffd@0 6 cdom = myunion(T1.cdom, T2.cdom);
wolffd@0 7 dom = myunion(ddom, cdom);
wolffd@0 8 ns = zeros(1, max(dom));
wolffd@0 9 ns(T1.ddom) = T1.dsizes;
wolffd@0 10 ns(T2.ddom) = T2.dsizes;
wolffd@0 11 ns(T1.cdom) = T1.csizes;
wolffd@0 12 ns(T2.cdom) = T2.csizes;
wolffd@0 13
wolffd@0 14 T = cgpot(ddom, cdom, ns);
wolffd@0 15 T = multiply_by_pot(T, T1);
wolffd@0 16 T = multiply_by_pot(T, T2);