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

Last change on this file since 118 was 118, checked in by pinsard, 18 years ago

add $ in Calendar, Grid, Interpolation, Obsolete and Postscript *.pro files, add svn:keywords Id to all these files, some improvements in header

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 489 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.