[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
extrapolate forbidden with interp1, spline
From: |
Eric Chassande-Mottin |
Subject: |
extrapolate forbidden with interp1, spline |
Date: |
Tue, 27 Nov 2007 11:12:22 +0100 |
hi,
I just wanted to mention that the extrapolation
(of a point outside the support of the input data set)
is *not* allowed using interp1() with opt "spline" in GNU
Octave, while it is in the corporate world.
see:
octave:1> interp1([1 2 3 4],[1 2 3 4],-1,'spline')
ans = NA
interp1 is the user-defined function from the file
/usr/share/octave/2.9.14/m/general/interp1.m
>> interp1([1 2 3 4],[1 2 3 4],-1,'spline')
ans =
-1
perhaps the way to solve this incompatibility
is to invite the use of the 'extrap' opt with a warning
octave:22> interp1([1 2 3 4],[1 2 3 4],-1,'extrap')
ans = -1
cheers, eric.
- extrapolate forbidden with interp1, spline,
Eric Chassande-Mottin <=