; IDL Version 5.3 (linux x86) ; Journal File for brandenb@norlap2 ; Working directory: /usr/home/brandenb/wolfgang ; Date: Tue Nov 21 15:40:34 2000 ;!d.n_colors= 16777216 x=5D0 help,x help,complex(x,7) help,complex(5,7) help,dcomplex(5,7) help,complex(5,7d0) help,complex(5d0,7d0) print,2/3 ; 0 print,2./3 ; 0.666667 help,!p help,!p,/STRUCT zeros=fltarr(10,20) ones=make_array(10,20) ones=make_array(20,20,/NOZERO) ; ones will now contain random data ones=make_array(10,20,VALUE=1) zeros[0,0]=1 print,zeros ; 1.00000 0.00000 0.00000 0.00000 0.00000 0.00000 ; 0.00000 0.00000 0.00000 0.00000 ; etc count=indgen(10) print,count ; 0 1 2 3 4 5 6 7 8 ; 9 count=findgen(10) print,count ; 0.00000 1.00000 2.00000 3.00000 4.00000 5.00000 ; 6.00000 7.00000 8.00000 9.00000 nx=50 & ny=60 &nz=70 x = findgen(nx) print,x ; 0.00000 1.00000 2.00000 3.00000 4.00000 5.00000 ; 6.00000 7.00000 8.00000 9.00000 10.0000 11.0000 ; 12.0000 13.0000 14.0000 15.0000 16.0000 17.0000 ; 18.0000 19.0000 20.0000 21.0000 22.0000 23.0000 ; 24.0000 25.0000 26.0000 27.0000 28.0000 29.0000 ; 30.0000 31.0000 32.0000 33.0000 34.0000 35.0000 ; 36.0000 37.0000 38.0000 39.0000 40.0000 41.0000 ; 42.0000 43.0000 44.0000 45.0000 46.0000 47.0000 ; 48.0000 49.0000 x0=-1. & x1=1. x = x0 + findgen(nx)/(nx-1.)*(x1-x0) print,x ; -1.00000 -0.959184 -0.918367 -0.877551 -0.836735 -0.795918 ; -0.755102 -0.714286 -0.673469 -0.632653 -0.591837 -0.551020 ; -0.510204 -0.469388 -0.428571 -0.387755 -0.346939 -0.306122 ; -0.265306 -0.224490 -0.183673 -0.142857 -0.102041 -0.0612245 ; -0.0204082 0.0204082 0.0612245 0.102041 0.142857 0.183674 ; 0.224490 0.265306 0.306122 0.346939 0.387755 0.428571 ; 0.469388 0.510204 0.551020 0.591837 0.632653 0.673469 ; 0.714286 0.755102 0.795918 0.836735 0.877551 0.918367 ; 0.959184 1.00000 x = linspace(-1,1,nx) print,x ; -1.00000 -0.959184 -0.918367 -0.877551 -0.836735 -0.795918 ; -0.755102 -0.714286 -0.673469 -0.632653 -0.591837 -0.551020 ; -0.510204 -0.469388 -0.428571 -0.387755 -0.346939 -0.306122 ; -0.265306 -0.224490 -0.183673 -0.142857 -0.102041 -0.0612245 ; -0.0204082 0.0204082 0.0612245 0.102041 0.142857 0.183674 ; 0.224490 0.265306 0.306122 0.346939 0.387755 0.428571 ; 0.469388 0.510204 0.551020 0.591837 0.632653 0.673469 ; 0.714286 0.755102 0.795918 0.836735 0.877551 0.918367 ; 0.959184 1.00000 x = linspace(0,1,nx,/PERIODIC) print,x ; 0.00000 0.0200000 0.0400000 0.0600000 0.0800000 0.100000 ; 0.120000 0.140000 0.160000 0.180000 0.200000 0.220000 ; 0.240000 0.260000 0.280000 0.300000 0.320000 0.340000 ; 0.360000 0.380000 0.400000 0.420000 0.440000 0.460000 ; 0.480000 0.500000 0.520000 0.540000 0.560000 0.580000 ; 0.600000 0.620000 0.640000 0.660000 0.680000 0.700000 ; 0.720000 0.740000 0.760000 0.780000 0.800000 0.820000 ; 0.840000 0.860000 0.880000 0.900000 0.920000 0.940000 ; 0.960000 0.980000 x = linspace(-1,1,nx) y = linspace(-1.5,1.5,ny) z = linspace(0.2,5,nz) xx = rebin(reform(x,nx,1),nx,ny) help,xx surface,xx yy = rebin(reform(y,1,ny),nx,ny) surface,yy rr = sqrt(xx^2+yy^2) surface,rr surface,-rr ff = sin(6*xx)*exp(-2*rr) surface,ff, x, y help,ff[2:5,0] help,ff[2:5,4:7] bad = where(rr gt 0.5) ff[bad]=0 ; But you should first check whether bad[0] is different from -1 surface,ff, x, y f = sin(3*x)*exp(-x) plot, x, f plot, x, f, XRANGE=[0,1] plot, x, f, XR=[0,1] plot, x, f, XR=[0,1],COLOR=150 plot, x, f, PSYM=-4 plot, x, f, PSYM=10 g = sqrt(2*!pi*z)*z^z*exp(-z) plot,z,g plot,z,g,/XLOG,/YLOG plot,z,g,/YLOG oplot, z, gamma(z+1),LINESTYLE=2,COLOR=150,THICK=3 xyouts,0.5,1.5,"Stirling's formula" surface, ff, x,y for i=0,360,10 do begin surface,ff,x,y,AZ=25+i & wait,0.1 shade_surf, ff, x,y loadct,3 shade_surf, ff, x,y contour, ff, x, y contour, ff, x, y, /FILL contour, ff, x, y, /FILL, NLEVELS=30 contourfill, ff, x, y contourfill, ff, x, y, /GRID gg = cos(xx)*exp(-rr) velovect, ff, gg, x, y vel, ff, gg vel, ff, gg, LEN=0.2, NVECS=1000 contourfill,ff,x,y contour,ff,x,y,NLEVELS=20,/OVERPLOT velovect, ff, gg, x, y, /OVERPLOT xxx = rebin(reform(x, nx,1,1),nx,ny,nz) yyy = rebin(reform(y, 1,ny,1),nx,ny,nz) zzz = rebin(reform(z, 1,1,nz),nx,ny,nz) help,xxx,yyy,zzz rrr = sqrt(xxx^2+yyy^2) phi = atan(yyy,xxx) m=1 kz=2*!pi/(z[nz-1]-z[0]) fff = rrr^2*exp(-4*rrr^2)*cos(m*phi-kz*zzz) shade_volume, fff, 0.9*max(fff), vert, poly scale3, XRANGE=[0,nx], YR=[0,ny], ZR=[0,nz] image = polyshade(vert,poly,/T3D) tv, image isoviz,fff ; {\AA}ke Nordlund's routine window,1 !p.multi=[0,3,2] for i=0,5 do plot,x,x^i,xrange=[0,1] !p.multi=0 ; Reset to single plot plot,[0,1] xloadct wset,0 print,htan(0.7) ; 0.842288 jabber, 5, 3, htan(-2) ;(x,y,z) = 5 3 -0.964028 jabber,5,3,htan(-2),/BRILLIG ;Brillig ;(x,y,z) = 5 3 -0.964028