Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » sci.math.* » sci.math

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
onn1.reo@gmail.com

Posts: 2
Registered: 7/10/13
piecewise-linear approximation
Posted: Jul 10, 2013 11:33 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


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



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.