analysis/
mg_linear_function.pro
Routines
top mg_linear_function
result = mg_linear_function(in_range, out_range)
Create a function which maps in_range
to out_range
with a linear
function and returns the coefficients.
Return value
Parameters
- in_range in required type=2-element numeric array
input range
- out_range in required type=2-element numeric array
output range
Examples
To create a linear function that maps the x
-range of a surface object
to the range -0.75 to 0.75 use:
osurface->getProperty, xrange=xr
xc = mg_linear_function(xr, [-0.75, 0.75])
osurface->setProperty, xcoord_conv=xc
osurface->getProperty, xrange=xr
xc = norm_coord(xr)
xr[0] -= 0.5
osurface->setProperty, xcoord_conv
MG_LINEAR_FUNCTION
example).
File attributes
Modification date: | Wed May 14 15:07:14 2014 |
Lines: | 5 |
Docformat: | rst rst |
Contact me if you have enhancement requests or bug fixes.