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

Home » Public Forums » archive » summation and 3d plot
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: summation and 3d plot [message #68514 is a reply to message #68421] Thu, 29 October 2009 21:00 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jeremy Bailin writes:

> Can't you replace the for loops with:
>
> nnx = n_elements(nx)
> nny = n_elements(ny)
> nN = n_elements(N)
> x0 = rebin(reform(x0,nnx,1,1),nnx,nny,nN)
> y0 = rebin(reform(y0,1,nny,1),nnx,nny,nN)
> phi = rebin(reform(phi,1,1,nN),nnx,nny,nN)
> r0 = sqrt(x0^2 + y0^2)
> x = abs(x0*cos(phi) + y0*sin(phi))
> y = -x0*sin(phi) + y0*cos(phi)
> h = 50.-y
> deffs = sqrt(d^2 + 2./mu*tan(a/2.*!pi/180.))
> S = deffs^2 * sin(atan(x/h))^3 / (4.*h)^2 * 100.
> deffr = d + alog(2.)/mu*tan(a/2.*!pi/180.)
> R = sqrt((h/f*ri)^2 + (deffr*(h+f)/f)^2)

You gotta love people who have too much time on
their hands! :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problems with dialog_pickfile and JavaBridge
Next Topic: weird contour lines

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

Current Time: Fri Oct 10 04:13:30 PDT 2025

Total time taken to generate the page: 1.74008 seconds