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

Last change on this file since 232 was 231, checked in by pinsard, 17 years ago

improvements/corrections of some *.pro headers

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