FUNCTION TRUNCATED_RAMP,X,b ;+ ; FUNCTION TRUNCATED_RAMP,X ; Computes a truncated ramp function for any list of values represented ; by the vector x. The ramp is zero outside the range [-b,b] ; ; USAGE: ; x=FINDGEN(1001)/20-25 CREATE A VECTOR ON THE INTERVAL [-25,25] ; y=TRUNCATED_RAMP((x-8)/5,3) Construct a function that is shifted and stretched ; ; HISTORY ; Written by Harvey Rhody, October, 2000 ;- RETURN,(ABS(X) LE b)*X END