MathGroup Archive 2012

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

Search the Archive

R: Re: good list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125152] R: Re: good list
  • From: "Brambilla Roberto Luigi (RSE)" <Roberto.Brambilla at rse-web.it>
  • Date: Sat, 25 Feb 2012 01:52:55 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201202231045.FAA07331@smc.vnet.net>

Dear Alexej,
It works fine! 
Many thanks again, Roberto.

===============
Myfunc involves a Cauchy Principal Value integral on a finite interval that often fails when applied to an interpolated function.

somelist={..,{xi,fi},..};
fo=Interpolation[somelist];
myfunc[x_]:=CauchyPrincipalValue[fo[u]/(u-x),{u,a,{x},b}] (*verMath5.1*)

nstep=100;
mylist=Table[{x,myfunc[x],{x,a,b,(b-a)/nstep}];



-----Messaggio originale-----
Da: Alexei Boulbitch [mailto:Alexei.Boulbitch at iee.lu] 
Inviato: gioved=EC 23 febbraio 2012 11.45
A: mathgroup at smc.vnet.net
Oggetto: Re: good list

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>



RSE SpA ha adottato il Modello Organizzativo ai sensi del D.Lgs.231/2001, in forza del quale l'assunzione di obbligazioni da parte della Societ=E0 avviene con firma di un procuratore, munito di idonei poteri.
RSE adopts a Compliance Programme under the Italian Law (D.Lgs.231/2001). According to this RSE Compliance Programme, any commitment of RSE is taken by the signature of one Representative granted by a proper Power of Attorney. Le informazioni contenute in questo messaggio di posta elettronica sono riservate e confidenziali e ne e' vietata la diffusione in qualsiasi modo o forma. Qualora Lei non fosse la persona destinataria del presente messaggio, La invitiamo a non diffonderlo e ad eliminarlo, dandone gentilmente comunicazi one al mittente. The information included in this e-mail and any attachments are confidential and may also be privileged. If you are not the correct recipient, you are kindly requested to notify the sender immediately, to cancel it and not to disclose the contents to any other person.



  • References:
  • Prev by Date: Re: Complex and Solve
  • Next by Date: Re: Extensive replacement of trigonometric functions
  • Previous by thread: Re: good list
  • Next by thread: How add a menu item with a menu key using an init.m