Hi ,
looking for highest speed, I experimented successfully to use native function linear_interpn instead of interp1 macro, significantly faster on large dataset.
function yp= interp0(x,y,xp)
i = floor(linear_interpn(xp,x,1:length(x),"C0"))
yp = y(i)
endfunction
So the suggestion is to add the piecewise constant interplotation feature rather to linear_interpn .
best,
David