Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



piecewiselinear approximation
Posted:
Jul 10, 2013 11:33 PM


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= 2
which 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



