Last change
on this file since 163 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
|
Rev | Line | |
---|
[101] | 1 | ;+ |
---|
[125] | 2 | ; |
---|
| 3 | ; |
---|
[118] | 4 | ; @param xin {in}{required} |
---|
| 5 | ; |
---|
| 6 | ; @version $Id$ |
---|
| 7 | ; |
---|
[101] | 8 | ;- |
---|
[59] | 9 | FUNCTION imoms3, xin |
---|
[114] | 10 | ; |
---|
| 11 | compile_opt idl2, strictarrsubs |
---|
| 12 | ; |
---|
[59] | 13 | |
---|
| 14 | x = abs(xin) |
---|
[125] | 15 | y = fltarr(n_elements(x)) |
---|
[59] | 16 | |
---|
| 17 | test1 = where(x LT 1) |
---|
| 18 | IF test1[0] NE -1 THEN BEGIN |
---|
| 19 | xtmp = x[test1] |
---|
[69] | 20 | y[test1] = 0.5*xtmp*xtmp*xtmp -xtmp*xtmp -0.5*xtmp + 1 |
---|
[59] | 21 | ENDIF |
---|
| 22 | test1 = where(x LT 2 AND x GE 1) |
---|
| 23 | IF test1[0] NE -1 THEN BEGIN |
---|
| 24 | xtmp = x[test1] |
---|
[69] | 25 | y[test1] = (-1./6.)*xtmp*xtmp*xtmp + xtmp*xtmp - (11./6.)*xtmp + 1 |
---|
[59] | 26 | ENDIF |
---|
| 27 | |
---|
| 28 | RETURN, y |
---|
| 29 | END |
---|
Note: See
TracBrowser
for help on using the repository browser.