FUNCTION RECT,X ;+ ; FUNCTION RECT,X ; Computes the standard RECT function for any list of values represented ; by the vector x. ; ; USAGE: ; x=FINDGEN(1001)/20-25 CREATE A VECTOR ON THE INTERVAL [-25,25] ; y=RECT((x-8)/5) Construct a function that is shifted and stretched ; ; HISTORY ; Written by Harvey Rhody, September 1997 ;- RETURN,0.0*X+(X GE -0.5 AND X LE 0.5) END