Re: good list
- To: mathgroup at smc.vnet.net
- Subject: [mg125126] Re: good list
- From: Alexei Boulbitch <Alexei.Boulbitch at iee.lu>
- Date: Thu, 23 Feb 2012 05:45:20 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
Hi to all, 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. Many thanks, Roberto Hi, Roberto, Try this: myFunc[x_]:=NIntegrate[Exp[-x*y^2],{y,0,\[Infinity]}]//Quiet; Select[Table[{x,If[NumericQ[myFunc[x]]//Quiet,myFunc[x]]},{x,-1,1,0.1}],#[[2]]=!=Null&] {{5.55112*10^-17,1.18945*10^8},{0.1,2.8025},{0.2,1.98166},{0.3,1.61802},{0.4,1.40125},{0.5,1.25331},{0.6,1.14411},{0.7,1.05924},{0.8,0.990832},{0.9,0.934165},{1.,0.886227}} Have fun, Alexei Alexei BOULBITCH, Dr., habil. IEE S.A. ZAE Weiergewan, 11, rue Edmond Reuter, L-5326 Contern, LUXEMBOURG Office phone : +352-2454-2566 Office fax: +352-2454-3566 mobile phone: +49 151 52 40 66 44 e-mail: alexei.boulbitch at iee.lu<mailto:alexei.boulbitch at iee.lu>
- Follow-Ups:
- R: Re: good list
- From: "Brambilla Roberto Luigi (RSE)" <Roberto.Brambilla@rse-web.it>
- R: Re: good list