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

Home » Public Forums » archive » QROMB problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
QROMB problem [message #31407] Mon, 08 July 2002 01:31
fskhk is currently offline  fskhk
Messages: 5
Registered: August 2001
Junior Member
I am working with Windows 98 and IDL 5.1. I want to get the integral
of a function by using the QROMB or QSIMP function. I want to
integrate to PHI, with R as a variable. How can I change the value of
R each time calling the function. Here is my program (where I get the
same answer each time, of cause):

FUNCTION cosvb1, phi
COMMON cosparm, R
alfa=1.
R=0.1
RETURN, 1./SQRT(1.+R^2.*alfa^2.*(cos(phi-R))^2.)
END

a=0.0
b=!pi*2.0
R=0.1

ANSWER=fltarr(20)

for i=0,19 do begin
ANSWER(i)= (1./(2.*!pi))*QROMB('cosvb1',a,b,EPS=0.0001,JMAX=35)
print, answer(i)
R = R*1.1
endfor

END

I will appreciate any kind of help.

Helena
[Message index]
 
Read Message
Previous Topic: plotting on a sphere
Next Topic: SOM projection (MISR) in IDL ?

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

Current Time: Wed Oct 08 19:03:04 PDT 2025

Total time taken to generate the page: 0.00432 seconds