How to set a range to plot(fittedmodel)
28 ビュー (過去 30 日間)
古いコメントを表示
I have plotted a graph and generated a fitting with MATLAB curve fitting app.
When i use plot(fittedmodel), the curve fit goes to infinity. I would like to set a range on which the fitting curve will be plotted.
0 件のコメント
回答 (1 件)
Walter Roberson
2021 年 12 月 16 日
Instead of using plot() of the fit object, use linspace() to generate a range of x values, and pass the range into the fit object
MyFitResult = fit(....);
x = linspace(0, 2.2);
y = MyFitResult(x) ;
plot(x, y)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Get Started with Curve Fitting Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!