Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* [Off-Topic:] Number game: interpolation
@ 1997-12-12  2:41 Christopher Curtis
  0 siblings, 0 replies; 3+ messages in thread
From: Christopher Curtis @ 1997-12-12  2:41 UTC (permalink / raw)


Hello,

Sorry this isn't really related to Linux/AXP, but there seem to be quite a
few people out there who are really into these numbers things, and I need
help finding an algorithm.

I have a project that requires, at some points, interpolation, and I'm
trying to find a good algorithm.  I have numerical recipies and a college
text, "An Introduction to Numerical Methods," but recipies has let me
down, and the other one doesn't have any code.  =)

I can derive linear interpolation by myself (and have) and I've taken a
cubic spline from Recipies.  The problem is that I don't have a nice
dataset.  The graph increases slowly, then very rapidly, until it hits a
cutoff point, at which it falls constant.  The graph look like:

                                        ................
                                       .

                                      .

                                     .

                                    .
                                   .
                                 ..
                              ...
                          ....
                     .....
               ......
        .......
........

The linear method won't work well for us where the data curves well (it
appears very 'choppy' when graphed) and cubic spline has a fit when the
derivates fall to zero at the end.

I've done a web search for what I think I'm looking for: A corrective
algorithm that implements several methods, and choses the 'best' one after
performing some sort of estimated error, but mostly all I'm able to find
are pages that contain every word in the american language in white on
white backgrounds selling property in the former Czech republic.  :(

I was wondering if such a beast existed anywhere, or if someone could
point me to some code somewhere (preferrably in electronic form) that
would help here.  I'm doing C, but think I can Xlate fortran  =)

Thanks in advance,

--
Christopher Curtis               - http://www.ee.fit.edu/users/ccurtis
Florida Institute of Technology  - System Administrator, Programmer
Melbourne, Florida  USA          - http://www.lp.org/

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re:  [Off-Topic:] Number game: interpolation
@ 1997-12-12  8:37 Jack Wathey
  0 siblings, 0 replies; 3+ messages in thread
From: Jack Wathey @ 1997-12-12  8:37 UTC (permalink / raw)


> The linear method won't work well for us where the data curves well (it
> appears very 'choppy' when graphed) and cubic spline has a fit when the
> derivates fall to zero at the end.

I don't have a "corrective" algorithm such as you describe,
but I do have a fairly simple parabolic interpolation algorithm.
It requires that the abscissas of the points between which
you are interpolating be evenly spaced, and each interpolation
requires 3 points, rather than the two used in linear interpolation.
If the 3 points are collinear, it reduces to linear interpolation,
so it would probably give good results in both parts of your 
curve.  It might not be terribly clean at the transition,
but it would not do anything disastrous.  Let me know if you
think this might be appropriate and I'll go digging through
my old notes.  Somewhere I have the code in Pascal, which
p2c should be able to convert.

Jack Wathey

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 3+ messages in thread
[parent not found: <Pine.GSO.3.96.971211212836.18210B-100000@yacht.ee.fit.edu>]

end of thread, other threads:[~1997-12-12 13:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-12-12  2:41 [Off-Topic:] Number game: interpolation Christopher Curtis
  -- strict thread matches above, loose matches on Subject: below --
1997-12-12  8:37 Jack Wathey
     [not found] <Pine.GSO.3.96.971211212836.18210B-100000@yacht.ee.fit.edu>
1997-12-12 13:19 ` Tom Browder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox