Re: Piecewise Constant Interpolation
- To: mathgroup at smc.vnet.net
- Subject: [mg103458] Re: [mg103450] Piecewise Constant Interpolation
- From: Adriano Pascoletti <adriano.pascoletti at dimi.uniud.it>
- Date: Tue, 22 Sep 2009 07:10:15 -0400 (EDT)
- References: <200909212328.TAA01784@smc.vnet.net>
And this? Interpolation [ Transpose [ { a ,RotateRight[ b] } ] , InterpolationOrder -> 0 ] Adriano Pascoletti 2009/9/22 Bayers, Alexander <alexander.bayers at bofasecurities.com> > 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 > >
- References:
- Piecewise Constant Interpolation
- From: "Bayers, Alexander" <alexander.bayers@bofasecurities.com>
- Piecewise Constant Interpolation