source: trunk/SRC/Interpolation/imoms3.pro @ 114

Last change on this file since 114 was 114, checked in by smasson, 18 years ago

new compilation options (compile_opt idl2, strictarrsubs) in each routine

  • Property svn:executable set to *
File size: 438 bytes
RevLine 
[101]1;+
2;
3;-
[59]4FUNCTION imoms3, xin
[114]5;
6  compile_opt idl2, strictarrsubs
7;
[59]8
9  x = abs(xin)
10  y = fltarr(n_elements(x))
11
12  test1 = where(x LT 1)
13  IF test1[0] NE -1 THEN BEGIN
14    xtmp = x[test1]
[69]15    y[test1] = 0.5*xtmp*xtmp*xtmp -xtmp*xtmp -0.5*xtmp + 1
[59]16  ENDIF
17  test1 = where(x LT 2 AND x GE 1)
18  IF test1[0] NE -1 THEN BEGIN
19    xtmp = x[test1]
[69]20    y[test1] = (-1./6.)*xtmp*xtmp*xtmp + xtmp*xtmp - (11./6.)*xtmp + 1
[59]21  ENDIF
22
23  RETURN, y
24END
Note: See TracBrowser for help on using the repository browser.