comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Array Integration
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Array Integration [message #80831] Fri, 13 July 2012 11:51
Maryam is currently offline  Maryam
Messages: 16
Registered: July 2012
Junior Member
Hello.

I am trying to perform a numerical integration in IDL where one of my variables is an array. Here is what I wrote:

pro ind_intg

delta=1.0
W=[0.0212330,0.0424661,0.127398,0.212330,0.297263,0.424661,0 .530826,0.636991,0.743157,0.849322,0.955487,1.06165,1.16782, 1.27398]
num_elements=14
A = fltarr(num_elements)
for i = 0, num_elements-1 do begin
A(i) = qpint1d('((2.*!pi*deltan^4) * x * (1+deltan^2*x^2)^(-3) * exp(-wn^2*x^2) )', $
/expression, 0., +inf)
endfor
print, A

stop
end


But I get the following error message:

% QPINT1D: USAGE:
% QPINT1D: G = QPINT1D(FUNCNAME, A, B, $
% QPINT1D: [EPSABS=, EPSREL=, ERROR=, STATUS=])
% QPINT1D: (or)
% QPINT1D: G = QPINT1D(EXPR, A, B, /EXPRESSION, $
% QPINT1D: [EPSABS=, EPSREL=, ERROR=, STATUS=])
NaN NaN NaN NaN NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN


Can anyone please let me know where I could be making a mistake? Thanks...
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Use of /APPEND keyword
Next Topic: Re: compilation strangeness

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:41:14 PDT 2025

Total time taken to generate the page: 0.00463 seconds