diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/toolboxes/FullBNT-1.0.7/bnt/potentials/@cgpot/multiply_pots.m	Tue Feb 10 15:05:51 2015 +0000
@@ -0,0 +1,16 @@
+function T = multiply_pots(T1, T2)
+% MULTIPLY_POTS Multiply a pair of dpots together pointwise (cgpot)
+% T = multiply_pots(pots)
+
+ddom = myunion(T1.ddom, T2.ddom);
+cdom = myunion(T1.cdom, T2.cdom);
+dom = myunion(ddom, cdom);
+ns = zeros(1, max(dom));
+ns(T1.ddom) = T1.dsizes;
+ns(T2.ddom) = T2.dsizes;
+ns(T1.cdom) = T1.csizes;
+ns(T2.cdom) = T2.csizes;
+
+T = cgpot(ddom, cdom, ns);
+T = multiply_by_pot(T, T1);
+T = multiply_by_pot(T, T2);