Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

Re: Re: How to ...?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg36368] Re: [mg36350] Re: How to ...?
  • From: "Juan E. Fuentes Betancourt" <jfuentes at ff.oc.uh.cu>
  • Date: Tue, 3 Sep 2002 01:41:11 -0400 (EDT)
  • References: <200209020809.EAA15842@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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