Fitting a plot with interpolation
9 views (last 30 days)
Walter Roberson on 16 Jun 2021
interp1() for 1D cases, interp2() for 2D cases
However, it does not sound to be as if you want to use either. It looks to me as if you want to use the Curve Fitting Toolbox fittype() and fit() functions. Then you want to evaluate the fitted model at a particular location, which you can do by using the returned fit object as if it were a function.
F = fittype('poly2')
p = fit((1:5).', rand(5,1), F)
Except that you would be constructing a different fittype() object, and using real data instead of the fake data I used here.