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.independent

Topic: Equations of a Straight Line with multiple points
Replies: 2   Last Post: Dec 7, 2012 7:37 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Torsten Hennig

Posts: 2,419
Registered: 12/6/04
Re: Equations of a Straight Line with multiple points
Posted: Dec 7, 2012 6:56 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

> I'd like to create a formula that create multiple
> straight lines. It all has to be in one single
> formula. For example:
>
> p1(0,0)
> p2(1,4)
> p3(2,9)
> p4(5,9)
>
> The slope should always be 0 and at any given point
> the y value should jump to the y value.
>
> Is this possible at all? If not, would it be possible
> if I just do a linear interpolation. If so, how can I
> get the correct formula?
>
> thanks


L(x)=4*x*(x>=0)*(x<=1)+(4+5*(x-1))*(x>1)*(x<=2)+9*(x>2)*(x<=5)

Best wishes
Torsten.



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.