how to fit a curve with the given trend to the limited data points
3 views (last 30 days)
Show older comments
Please find the attached.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/195473/image.jpeg)
I have plotted curve 2 with the limited data point and want to continue it up to the horizontal axis like curve 1. Therefore I used curve fitting. The trends of the curve 2 should be the same as curve 1 however, after fitting a curve (dashed line), it shows totally different behavior after endpoint of curve 2. please let me know how to continue fitting curve trend similar to curve 1. here is whatever I have written so far:
x1= linspace(min(Mu_s_srt1),10,200);
p=polyfit(Mu_s_srt1,(1-Mu_s_P1),2);
f1=polyval(p,x1);
hold on;
loglog(x1,f1,'--k','linewidth',2);
hold on;
loglog(Mu_s_srt1, 1-Mu_s_P1,'-b', 'linewidth',2);
grid minor;
hold on;
7 Comments
Image Analyst
on 9 Sep 2018
It's hard to force the curve down on the right side when you're extrapolating. If you don't have a point out there to help pull it down, and just go by what you have on the left, it might not go down there. How about if you just specify one point way out on the right to help pull it down. It doesn't have to be that accurate, just something to help pull the extrapolation downwards.
Answers (0)
See Also
Categories
Find more on Linear and Nonlinear Regression 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!