0
votes

I feel like this should be something simple to solve - but I'm struggling to find the answer anywhere.

I have a set of 'R' values and a set of time values, I want to use curve fitting (I haven't used this part of the software before) to calculate the 'R' values at a different set of time values, literally just be able to access what is displayed in a figure created using curve fitting using a different set of time values (ie I can point the curser to the values I want on a figure and write them down but this is not efficient at all for the number of time values I have). Context is an orbital motion radius vs time.

Thanks in advance :)

1

1 Answers

0
votes

You can use Matlab's fit function to do this very easily. Assuming you have your data in arrays r and t, you can do something like this:

f = fit(t, r, 'smoothingspline')
disp(f(5))

If you consult the documentation, you can see the various fit types available. (See https://www.mathworks.com/help/curvefit/fit.html)