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: Juan Pablo Carbajal
Subject: [Octave-bug-tracker] [bug #41980] interp1: piecewise linear interpolation with discontinuities behaves differently
Date: Sun, 30 Mar 2014 21:41:38 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36

Follow-up Comment #6, bug #41980 (project octave):

This patch fixes the problem reported by Mike. 

The following examples work fine

x = [0 1 1 2 2 3]
y = [-1 0 1 2 3 4]';
y2= [-1 0 1 2 3 4; -1 1 2 2 3 4]';
xi = linspace (0, 3, 1000)';
yi = interp1 (x, y, xi);
plot(xi,yi,'-',x,y,'.')
pause
yi = interp1 (x, y2, xi);
plot(xi,yi,'-',x,y2,'.')

Patch attached


(file #31081)
    _______________________________________________________

Additional Item Attachment:

File name: interp1.patch                  Size:0 KB


    _______________________________________________________

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]