Re: Problems defining function
- To: mathgroup at smc.vnet.net
- Subject: [mg40415] Re: [mg40374] Problems defining function
- From: Tomas Garza <tgarza01 at prodigy.net.mx>
- Date: Fri, 4 Apr 2003 01:29:43 -0500 (EST)
- References: <200304030642.BAA12615@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
I could not reproduce your problem in my machine. It plots h[x] as it
should. Perhaps you can try inserting semicolons after each line?
Tomas Garza
Mexico City
----- Original Message -----
From: "Vadim Nagornyi" <vnagornyi at netscape.net>
To: mathgroup at smc.vnet.net
Subject: [mg40415] [mg40374] Problems defining function
> Hello,
> I am defining a function:
> h[x_]:=0/;x<0
> h[x_]:=x/;x>=0
>
> When I try to plot the function:
> Plot[h[x],{x,-1,1}]
>
> I see that it's defined as h[x_]:=x on all values, not only positive ones.
> What am I missing here?
>
> Thanks.
> Vadim.
>
>
- References:
- Problems defining function
- From: vnagornyi@netscape.net (Vadim Nagornyi)
- Problems defining function