- Export the fit from the Curve Fitter app to the Workspace, using the "Export" option in the app's toolstrip. Assume the fit object is named "fitResult".
- Once we have the equation of the fit, we need to find the derivative. I will assume that the fit is polynomial, for which the derivative is already well known. You can use symbolic computation to find the equation of the derivative in general. Refer to the documentation of the "diff" function in MATLAB: https://www.mathworks.com/help/releases/R2020a/symbolic/diff.html
- Now we can calculate the slope of these tangent lines, and plot these lines at the specified points.