From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- math/deboor/progs/prog5.f | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 math/deboor/progs/prog5.f (limited to 'math/deboor/progs/prog5.f') diff --git a/math/deboor/progs/prog5.f b/math/deboor/progs/prog5.f new file mode 100644 index 00000000..b1fbb927 --- /dev/null +++ b/math/deboor/progs/prog5.f @@ -0,0 +1,27 @@ +chapter x. example 2. plotting the pol,s which make up a b-spline +c from * a practical guide to splines * by c. de boor +calls bsplvb +c + integer ia,left + real biatx(4),t(11),values(4),x +c knot sequence set here.... + data t / 4*0.,1.,3.,4.,4*6. / + do 20 ia=1,40 + x = float(ia)*.2 - 1. + do 10 left=4,7 + call bsplvb ( t, 4, 1, x, left, biatx ) +c +c according to bsplvb listing, biatx(.) now contains value +c at x of polynomial which agrees on the interval (t(left), +c t(left+1) ) with the b-spline b(left-4 + . ,4,t) . hence, +c biatx(8-left) now contains value of that polynomial for +c b(left-4 +(8-left) ,4,t) = b(4,4,t) . since this b-spline +c has support (t(4),t(8)), it makes sense to run left = 4, +c ...,7, storing the resulting values in values(1),..., +c values(4) for later printing. +c + 10 values(left-3) = biatx(8-left) + 20 print 620, x, values + 620 format(f10.1,4f20.8) + stop + end -- cgit