How can I fit a curve at the bottom of the plot below?
1 次查看(过去 30 天)
显示 更早的评论
I have the attached dataset and I want to fit a curve at the bottom of the curve. See the attached photo. The original data is in blue and the fit is that in black.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1425948/image.png)
Sample data is attached. Thank you in advance
0 个评论
采纳的回答
Matt J
2023-7-4
编辑:Matt J
2023-7-4
5 个评论
Matt J
2023-7-4
Ok, but what help do you still require? As you can see below, the recommendations from my last comment work for y.txt as well.
[~,y]=readvars('y.txt');
x=(1:numel(y))';
S=[1,0.7,0];
for s=S
k=boundary(x([1:end,1]), y([1:end,1]),s);
k=k(diff(k)>0);
plot(x(k),y(k),'-.');hold on
end;
legend("s="+S); xlim([100,400])
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!