PRO MESHDOM,x,y,XR,YR ;+ ; MESHDOM,x,y,XR,YR ; ; MESHDOM calculates arrays XR and YR that index a region with ; value pairs from (x,y). The arrays are of size Nx columns by ; Ny rows, where Nx is the length of x and Ny is the length of y. ; Each row of XR equals the vector x, and each column of YR ; equals the vector y. ; ; USAGE ; x=indgen(10) + 5 ; y=indgen(5) - 3 ; MESHDOM,x,y,XR,YR ; ; The results are the arrays shown below. ; ; ARRAY XR ; -5 -4 -3 -2 -1 0 1 2 3 4 ; -5 -4 -3 -2 -1 0 1 2 3 4 ; -5 -4 -3 -2 -1 0 1 2 3 4 ; -5 -4 -3 -2 -1 0 1 2 3 4 ; -5 -4 -3 -2 -1 0 1 2 3 4 ; ; ARRAY YR ; -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 ; -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 ; -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ; 0 0 0 0 0 0 0 0 0 0 ; 1 1 1 1 1 1 1 1 1 1 ; ; ; HISTORY ; Written by Harvey Rhody, November, 1996 ; Updated September, 1997 ; ;NAME ;MESHDOM ;- XR=x # (1+INTARR(N_ELEMENTS(y))) YR=(1+INTARR(N_ELEMENTS(x))) # y END