toppure_concave
Return value
y2: f(x2) = y2. Double precision array
Parameters
x1
in
required
x2
in
required
y1
in
required
y2
der2
x
Examples
IDL> n = 100L
IDL> x = (dindgen(n))^2
IDL> y = abs(randomn(0, n))
IDL> y[n/2:n/2+1] = 0.
IDL> y[n-n/3] = 0.
IDL> y[n-n/6:n-n/6+5] = 0.
IDL> y = total(y, /cumulative, /double)
IDL> x2 = dindgen((n-1)^2)
IDL> n2 = n_elements(x2)
IDL> print, min(y[1:n-1]-y[0:n-2]) LT 0
IDL> y2 = spl_incr( x, y, x2)
IDL> splot, x, y, xstyle = 1, ystyle = 1, ysurx=.25, petit = [1, 2, 1], /land
IDL> oplot, x2, y2, color = 100
IDL> c = y2[1:n2-1] - y2[0:n2-2]
IDL> print, min(c) LT 0
IDL> print, min(c, max = ma), ma
IDL> splot,c,xstyle=1,ystyle=1, yrange=[-.01,.05], ysurx=.25, petit = [1, 2, 2], /noerase
IDL> oplot,[0, n_elements(c)], [0, 0], linestyle = 1
Version history
Version
$Id: spl_incr.pro 371 2008-08-07 09:32:02Z pinsard $
History
Sebastien Masson (smasson@lodyc.jussieu.fr): May-Dec 2005
Known issues
Restrictions
It might be possible that y2[i+1]-y2[i] has very small negative
values (amplitude smaller than 1.e-6)...
Statistics
McCabe cyclic | 1 |
McCabe essential | 1 |
McCabe modular design | 1 |