Run npm install interp1 Add an import to the npm package import interp1 from 'interp1'; Then you can use the function in your code.
yl is -1, which I don't think is expected, causing all the "last" indices to be lower than the "first" indices. But having investigated thus far I'm not sure whether I did something wrong, maybe to do ...