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

Home » Public Forums » archive » Re: 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 #68388] Wed, 28 October 2009 17:40 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Oct 28, 9:12 pm, Nicki <nickireite...@yahoo.de> wrote:

> However the r0 did not work. And there is another error. The error
> message says "subscript range values of the form low:high must be >=0,
> < size, with low  <= high: S" and the error is in the S[i,j,*]=...
> line...
> What does that mean???

There were a few typos. This should work:

pro testif
nrows=1.
dfov=60.
mu=438.689
ri=0.1
wdet=45.
r=50.
a=73.73
N=10
d=0.736
f=29.33
nx=findgen(64)
ny=findgen(64)
x0=(30./32.*(0.5+nx))-30.
y0=(30./32.*(0.5+ny))-30.
N=findgen(10)
S=dblarr(n_elements(nx),n_elements(ny),n_elements(N))
phi=N*36*!pi/180
for i=0,n_elements(nx)-1 do begin
for j=0,n_elements(ny)-1 do begin
r0=sqrt(x0[i]^2+y0[j]^2)
if (r0 gt 30.) then S[i,j,*]=0 else begin
x=abs(x0[i]*cos(phi)+y0[j]*sin(phi))
y=-x0[i]*sin(phi)+y0[j]*cos(phi)
h=50.-y
deffs=sqrt(d^2+2/mu*tan(a/2*!pi/180))
S[i,j,*]=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)
endelse
endfor
endfor
S_plot=total(S,3)
print, x0, y0, s_plot
isurface,S_plot,x0,y0
end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: TLB_Frame_Attr weirdness/compile issue?
Next Topic: plot

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

Current Time: Wed Oct 08 19:21:17 PDT 2025

Total time taken to generate the page: 0.00852 seconds