[Top][All Lists]

[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 20:07:22 +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 #2, bug #41980 (project octave):

This might be a regression, introduced trying to fix the function for multiple
inputs. I am checking if I can fix this. However:

The data x,y doesn't define a function. There are two different outputs for
the same input. So linear interpolation is not defined, one could approximate,
but not interpolate. Now approximation is not the work of interp1
(optim-interp or regression functions would do the trick).

You case could be handled with "nearest", but what happens when there are more
than two values of the output for the same input?

I guess one could first check that the data is indeed discontinuous and not
noisy data, by checking that there are no more than 2 equal x values with
different y values. And then break the data into those points and produce
independent polynomials for each segment.

What does matlab do?


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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