interp1(): number | array
Linear interpolation.
Linear interpolation. Returns the 1-D value of Y, given Xi query points.
Interpolate at specific points
Interpolate at specific points
import { assertEquals } from "jsr:@std/assert"; var x = [1,2,3,4,5,6]; var y = [2,4,6,8,10,12]; assertEquals(interp1(x,y,[2,4,6]), [4, 8, 12]);
number | array
Interpolated values