1% Testing divand in 1 dimension.
2
3% grid of background field
4[xi] = linspace(0,1,30)';
5
6x = [.4 .6]';
7f = [.4 .6]';
8
9mask = ones(size(xi));
10mask([1 end]) = 0;
11
12pm = ones(size(xi)) / (xi(2)-xi(1));
13
14[fi,err] = divand(mask,pm,{xi},{x},f,.1,2);
15
16
17% Copyright (C) 2014 Alexander Barth <a.barth@ulg.ac.be>
18%
19% This program is free software; you can redistribute it and/or modify it under
20% the terms of the GNU General Public License as published by the Free Software
21% Foundation; either version 2 of the License, or (at your option) any later
22% version.
23%
24% This program is distributed in the hope that it will be useful, but WITHOUT
25% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
26% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
27% details.
28%
29% You should have received a copy of the GNU General Public License along with
30% this program; if not, see <http://www.gnu.org/licenses/>.
31