Re: Division by zero, despite strong hint
- To: mathgroup at smc.vnet.net
- Subject: [mg96595] Re: Division by zero, despite strong hint
- From: Pillsy <pillsbury at gmail.com>
- Date: Mon, 16 Feb 2009 16:42:26 -0500 (EST)
- References: <gnbk7i$3a3$1@smc.vnet.net>
On Feb 16, 6:55 am, dch888 <dch... at googlemail.com> wrote: > I'm trying to plot the Sin[1/x] curve with the curve being defined as > 0 at 0 like this: > g3[x_] := Piecewise[{{Sin[1/x], x != 0} {0, x == 0}}] > Hmmm... what's the trick here to stop Mathematica evaluating all the > branches of the piecewise fn? You're missing a comma between the two clauses. Cheers, Pillsy