This is a simple thing to do if you are willing to use a piecewise linear interpolant. More difficult is when the curve is a parametric spline or pchip model. The interparc.m function uses an ode solver to integrate the distance along the curve itself, then uses that ode solver to do the interpolation.