Piecewise-linear interpolation by matrix
y=f(K,x)
