valueAt
valueAt, function
def pure valueAt(z: zedfunc, x: number): number
Returns the value of zedfunc z at x. Fractional x uses linear
interpolation.
Example
table T = with
[| as N |]
[| 0 |]
[| 0.5 |]
[| 1 |]
[| 1.5 |]
[| 2 |]
a = max(constant(10) - linear(1) * linear(1), 0)
show table "valueAt(a, _)" with
T.N
valueAt(a, T.N)
This outputs the following table:
| N | valueAt(a, N) |
|---|---|
| 0 | 10 |
| 0.5 | 9.5 |
| 1 | 9 |
| 1.5 | 7.5 |
| 2 | 6 |