Re: good list

*To*: mathgroup at smc.vnet.net*Subject*: [mg125116] Re: good list*From*: Bill Rowe <readnews at sbcglobal.net>*Date*: Wed, 22 Feb 2012 05:31:30 -0500 (EST)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com

On 2/21/12 at 6:15 AM, Roberto.Brambilla at rse-web.it (Brambilla Roberto Luigi (RSE)) wrote: >I have a function myfunc[x] (of some complexity) and I want to >build the list of its values in the interval (a<=x<=b) with step >dx=(b-a)/nstep >nstep=100; >mylist=Table[{x,myfunc[x],{x,a,b,(b-a)/nstep}]; >According to the input value, sometimes myfunc[x] is not able to >give a numeric result >(in my case a singular difficult numerical integral) . In others >cases it works fine. >My question is how to build the list with only the good cases. Try mylist=Cases[Table[{x,myfunc[x],{x,a,b,(b-a)/nstep}],{_,_?NumericQ}]