Matlab "interp" function equivalent in math.numerics

Hello,
I want to solve matlabs first example in matlab’s website:

this example to be exact:

can someone help me ?