Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #8703
| From | Alexei Boulbitch <Alexei.Boulbitch@iee.lu> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: good list |
| Date | 2012-02-23 10:45 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <ji55cm$75d$1@smc.vnet.net> (permalink) |
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@iee.lu<mailto:alexei.boulbitch@iee.lu>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: good list Alexei Boulbitch <Alexei.Boulbitch@iee.lu> - 2012-02-23 10:45 +0000
csiph-web