MathGroup Archive 2002

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

Search the Archive

Re: Re: How to ...?


On 8/31/02 at 1:25 AM, berlusconi_pagliusi at fis.unical.it (Paskoski)
wrote:

>Dear MathGroup, I'd like to use Mathematica 4.0 to write a function
>having different expressions in different domain's intervals. Let's
>say:
>
>F[x_]=    x^2   if 0<x<6 x+1   if x>=6

Try
In[4]:=
F[x_]:=Which[0<x<6,x^2,x>=6,x+1]
you can plot the function with
In[5]:=
Plot[F[x],{x,0,8}]
Sincerely yours,

Dr. Juan E. Fuentes Betancourt
Facultad de Fisica 
Universidad de la Habana



  • Prev by Date: 3D plot
  • Next by Date: Re: How to ...? Thank you !!!!
  • Previous by thread: Re: How to ...?
  • Next by thread: Re: How to ...?