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

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

improvements/corrections of some *.pro headers + replace some message by some report

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