StepInterp

Revision as of 20:34, 5 October 2007 by Lchrisman (talk | contribs) (→‎Notes)


(stub)

Declaration

StepInterp( D,A,X,I)

Notes

StepInterp uses "right-lookup", finding a value u in D such that x<=u. In the interpolated graph, this makes the the step up takes place at the left edge of each interval. Sometimes you might want a "left-lookup", finding a value u in D such that u<=x. One implementation of this other variant is a UDF:

Function LStepInterp(D:ascending[I] ; R:Array[I] ; X ; I : Index )
Definition: 
   Var pos := StepInterp(D,@I,X,I);
   R[@I= if X=D[@I=pos] then pos else max([1,pos-1]) ]

See Also

Comments


You are not allowed to post comments.