Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

How does NIntegrate suppress messages?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg62410] How does NIntegrate suppress messages?
  • From: "Andrew Moylan" <andrew.moylan at anu.edu.au>
  • Date: Wed, 23 Nov 2005 01:12:51 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Whenever the integrand in NIntegrate generates messages (by calling 
Message), the output of these messages are suppressed, although they are 
still generated in the sense that they can be caught using Check. Does 
anyone know how NIntegrate does this?

Here is an example in which evaluating f at a number always generates a 
message, but no messages are displayed when f is called (many times) by 
NIntegrate (if you like I can also supply an example that shows that the 
suppressed messages can still be caught by calls to Check):

f::err = "error";

f[x_?NumericQ] :=
(
Message[f::err];
x
)

NIntegrate[f[x], {x, 0, 1}]



  • Prev by Date: Re: Modeling Saturation - Sensor or Acutuator
  • Next by Date: Re: Boolean Integral
  • Previous by thread: Re: Error code -43
  • Next by thread: Re: How does NIntegrate suppress messages?