Re: Plot, Epilog, and Text
- To: mathgroup at smc.vnet.net
- Subject: [mg80859] Re: Plot, Epilog, and Text
- From: Szabolcs <szhorvat at gmail.com>
- Date: Tue, 4 Sep 2007 03:48:53 -0400 (EDT)
- Organization: University of Bergen
- References: <200709020652.CAA25864@smc.twtelecom.net> <fbgn89$9qe$1@smc.vnet.net>
bsyehuda at gmail.com wrote: > 3. define g as g[X_String,w_?NumberQ,f_]:=... I have seen people use NumberQ before in situations like this, so I would like to point out that the more reliable solution is to use NumericQ. For example, NumberQ[Sqrt[2]] is False, NumberQ[Pi] is False, etc. The necessity to use _?NumericQ usually comes up when passing a function to NIntegrate (or other similar function). NIntegrate evaluates its argument with plain numbers, so using NumberQ will not lead to problems, but the function provided by the OP seems more likely to be evaluated (by the user) with numeric quantities that are not "Number"s. Szabolcs
- References:
- Plot, Epilog, and Text
- From: Bruce Colletti <vze269bv@verizon.net>
- Plot, Epilog, and Text