MathGroup Archive 2002

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

Search the Archive

Re: How to ...?


Andreas,

One simple approach is to write:

F[x_]:= x^2 /; 0<x<6
F[x_]:= x+1 /; x>=6

Hope this helps.  You want want to look up /; in the Help Browser.

Regards
Mark Westwood

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
> 
> I know It's a stupid syntax problem, but I really do not know how/where to
> search the solution on the Mathematica Book
> 
> Thank you in advance,
> 
> PasKo.


  • Prev by Date: Re: Mathematica 4.2: Problem with online help.
  • Next by Date: Generating Two Unit Orthogonal Vectors to a 3D Vector
  • Previous by thread: Re: Re: How to ...?
  • Next by thread: Re: How to ...?