On Tuesday, April 15, 2014 04:38:01 AM Spencer Lyon wrote:
> I am not sure I understand what you mean by
> 
> You could also scale the values if they aren’t usually spaced by 1.

Basically, any time your values are evenly spaced, there is a linear mapping 
x->xi from "physical" coordinates x to "indexing" coordinates xi, where x[1] 
corresponds to xi=1 and x[n] corresponds to xi=n. It's just a question of 
solving the equations

    1 = m*x[1] + b
    n = m*x[n] + b

for m and b. Then you can use ig[m*x+b] to evaluate at "physical"  locations.

--Tim

Reply via email to