- https://www.mathworks.com/matlabcentral/answers/94272-how-do-i-constrain-a-fitted-curve-through-specific-points-like-the-origin-in-matlab
- https://www.mathworks.com/matlabcentral/fileexchange/54207-polyfix-x-y-n-xfix-yfix-xder-dydx
- https://blogs.mathworks.com/pick/2015/12/11/polynomial-fit-passing-through-specified-points/
- https://www.mathworks.com/matlabcentral/fileexchange/35401-polyfitzero
- https://www.mathworks.com/matlabcentral/fileexchange/34765-polyfitn
Force begin/end slope of trendline scatterplot
8 views (last 30 days)
Show older comments
Hi,
I have a scatterplot through which I want to plot a trendline. Using polyfit I get a line through my plot as seen in the picture below. This is a 2nd order polyfit. Higher order fits give less fitting lines. The line looks like it has a minimum, which is not desired. What I want to achieve is to fix the slope at x =1 to be 0 so that it has no minimum. How can I do this?
0 Comments
Accepted Answer
Jan
on 12 Apr 2021
Edited: Jan
on 12 Apr 2021
See:
More Answers (0)
See Also
Categories
Find more on Scatter Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!