Mercurial > repos > public > sbplib
changeset 1241:d1b201fe328e feature/dirac_discr
Turn row vectors into column vectors in diracDiscr comments
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Tue, 19 Nov 2019 17:01:38 -0800 |
parents | 1fbd93f24bed |
children | ff613067dec6 |
files | diracDiscr.m |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
diff -r 1fbd93f24bed -r d1b201fe328e diracDiscr.m --- a/diracDiscr.m Tue Nov 19 16:59:11 2019 -0800 +++ b/diracDiscr.m Tue Nov 19 17:01:38 2019 -0800 @@ -2,7 +2,7 @@ function d = diracDiscr(g, x_s, m_order, s_order, H) % n-dimensional delta function % g: cartesian grid - % x_s: source point coordinate vector, e.g. [x, y] or [x, y, z]. + % x_s: source point coordinate vector, e.g. [x; y] or [x; y; z]. % m_order: Number of moment conditions % s_order: Number of smoothness conditions % H: cell array of 1D norm matrices @@ -30,7 +30,7 @@ % Helper function for 1D delta functions -function ret = diracDiscr1D(x_s , x , m_order, s_order, H) +function ret = diracDiscr1D(x_s, x, m_order, s_order, H) m = length(x); @@ -51,7 +51,7 @@ polynomial = (x(index)-x(index(1)))/(x(index(end))-x(index(1))); x_0 = (x_s-x(index(1)))/(x(index(end))-x(index(1))); - + quadrature = diag(H); quadrature_weights = quadrature(index)/h;