Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Topic: piecewise-linear approximation
Replies: 3   Last Post: Jul 12, 2013 9:51 AM

 Messages: [ Previous | Next ]
 onn1.reo@gmail.com Posts: 2 Registered: 7/10/13
piecewise-linear 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

Date Subject Author
7/10/13 onn1.reo@gmail.com
7/11/13 William Elliot
7/11/13 onn1.reo@gmail.com
7/12/13 Peter Percival