MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: simple question for mathematica tool


On 1/24/10 at 5:40 AM, emperor_mvs at hotmail.com (MANOLIS VOSKAKIS)
wrote:

>we have an equation tha is divided in to sub equations f=150
>when 0<x15 f=x^3 when  15<x24

>how can i create a plot in mathematica?? i want all in 1 graph

First, use Piecewise to define f with the desired properties

f[x_] := Piecewise[{{150, x < 15}, {x^3, 15 < x < 24}}]

Then plot it using Plot

Plot[f[x], {x, 0, 30}]



  • Prev by Date: Re: Scrolling text: Changing text color, etc.
  • Next by Date: Re: FromCharacterCode
  • Previous by thread: Re: simple question for mathematica tool
  • Next by thread: Re: simple question for mathematica tool