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

Last change on this file since 134 was 134, checked in by navarro, 18 years ago

change *.pro file properties (del eof-style, del executable, set keywords Id

  • Property svn:keywords set to Id
File size: 486 bytes
Line 
1;+
2;
3;
4; @param xin {in}{required}
5;
6; @version $Id$
7;
8;-
9FUNCTION imoms3, xin
10;
11  compile_opt idl2, strictarrsubs
12;
13
14  x = abs(xin)
15  y = fltarr(n_elements(x))
16
17  test1 = where(x LT 1)
18  IF test1[0] NE -1 THEN BEGIN
19    xtmp = x[test1]
20    y[test1] = 0.5*xtmp*xtmp*xtmp -xtmp*xtmp -0.5*xtmp + 1
21  ENDIF
22  test1 = where(x LT 2 AND x GE 1)
23  IF test1[0] NE -1 THEN BEGIN
24    xtmp = x[test1]
25    y[test1] = (-1./6.)*xtmp*xtmp*xtmp + xtmp*xtmp - (11./6.)*xtmp + 1
26  ENDIF
27
28  RETURN, y
29END
Note: See TracBrowser for help on using the repository browser.