Piecewise Constant Interpolation
- To: mathgroup at smc.vnet.net
- Subject: [mg103450] Piecewise Constant Interpolation
- From: "Bayers, Alexander" <alexander.bayers at bofasecurities.com>
- Date: Mon, 21 Sep 2009 19:28:58 -0400 (EDT)
Hi, I've been trying to fit a function via piecewise constant interpolation using the Interpolate function and InterpolationOrder 0. Code: Interpolation [ Transpose [ { a , b } ] , InterpolationOrder -> 0 ] However, when I try to fit the function Mathematica uses righthand interpolation rather than lefthand interpolation, i.e. given the following set of data points 14-Sep-09 r0 14-Sep-11 r1 14-Sep-12 r2 14-Sep-13 r3 14-Sep-14 r4 A data point like 20-Sep-09 will evaluate as r1 rather than r0. Does anyone know of any option barring writing my own function that would allow me to set this date to r0 rather than r1? Thanks, Alex
- Follow-Ups:
- Re: Piecewise Constant Interpolation
- From: Adriano Pascoletti <adriano.pascoletti@dimi.uniud.it>
- Re: Piecewise Constant Interpolation