Re: Division by zero, despite strong hint
- To: mathgroup at smc.vnet.net
- Subject: [mg96735] Re: Division by zero, despite strong hint
- From: dch888 <dch888 at googlemail.com>
- Date: Mon, 23 Feb 2009 05:02:22 -0500 (EST)
- References: <gnbk7i$3a3$1@smc.vnet.net> <gncmjp$fnd$1@smc.vnet.net>
On Feb 16, 9:42 pm, Pillsy <pillsb... at gmail.com> wrote: > 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 A big THANK YOU to everyone that spotted my 'schoolboy' error ;-) I'm old enough to avoid this kind of thing! Or perhaps it's an early onset of senility ;-)