```Date: Jul 10, 2013 11:33 PM
Author: onn1.reo@gmail.com
Subject: piecewise-linear approximation

Hi All --I am trying to come up with an algorithm.  I know I am making this harder than is/should be.  I have multiple data sets that look alot like the example below:	if       {X}  > .09  then Y= +3	if .10 < {X}  > .13  then Y= +1.5	if .14 < {X}  > .19  then Y= +0	if .20 < {X}  > .26  then Y= -.5	if .27 < {X}  > .33  then Y= -1.5	if .33 < {X}         then Y= -2which would yields a "stair step" graph. MY QUESTION: How do I turn this -very discrete- and clumsy function I have right now into something more continuous and elegant?Is a polynomial interpolation the only appropriate method for something this basic?My equation doesnt have to hit all the data points (obviously it can't), but I would like something with tighter intervals that is more continuous without having to go in manually and break everything down further and further ( I have several dozen of the rules shown above, all with different values).  Thanks!Omar
```