octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #41980] interp1: piecewise linear interpolatio


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #41980] interp1: piecewise linear interpolation with discontinuities behaves differently
Date: Thu, 27 Mar 2014 18:43:56 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20100101 Firefox/17.0

URL:
  <http://savannah.gnu.org/bugs/?41980>

                 Summary: interp1: piecewise linear interpolation with
discontinuities behaves differently
                 Project: GNU Octave
            Submitted by: mtmiller
            Submitted on: Thu 27 Mar 2014 02:43:56 PM EDT
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Regression
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.1
        Operating System: Any

    _______________________________________________________

Details:

This change in behavior may be intentional, please let me know if that's the
case, but it appears like a regression to me.

In 3.6.4, something like the following worked very nicely:


x = [0 0.5 0.5 1]';
y = [0 0 1 1]';
xi = linspace (0, 1, 1000)';
yi = interp1 (x, y, xi);
isequal (yi, [zeros(500,1); ones(500,1)])
ans =  1


This is no longer possible in 3.8. Now the point (0.5,0) is removed from the
input set *before* interpolating, so the resulting line segments are from
(0,0) to (0.5,1) and from (0.5,1) to (1,1). If the "left" option is used, the
point (0.5,1) is removed instead, and the resulting two line segments are now
from (0,0) to (0,0.5) and from (0,0.5) to (1,1).

It looks to me like this changed with the fix for bug #40825, so can Rik or
JuanPi comment on whether this was intentional or an unfortunate side effect?




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41980>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]