在MATLAB 2016b中的同一图中绘制多个fitobjects

发布于 2025-01-17 15:17:51 字数 425 浏览 4 评论 0原文

我有多个 fitobjects,我想在同一个图中绘制它们。所有曲线均从 x 轴上的相同五个点(范围从 0.25 到 2.25)进行拟合。如果我单独绘制它们,则曲线仅正确地跨越 do 值之间,但是,一旦我添加保留以将它们绘制在同一个图中,第一个 fitobject 就会正确绘制,而第二个则跨越从 -Inf 到 +Inf,如果我更改 fitobjects 的顺序问题仍然存在。所以第一条曲线总是正确显示,而后面的曲线则不然。我什至还没有设置任何轴属性。此外,两个拟合对象具有相同的拟合边界。

示例代码:

plot(fitobj{1}, 'r'); hold on %curve from 0.25 to 2.25
plot(fitobj{2}, 'b'); %curve is shown from -Inf to +Inf

你知道为什么会发生这种情况吗?谢谢

I have multiple fitobjects that I want to plot in the same figure. All curves are fitted from the same five points on the x-axes (ranging from 0.25 to 2.25). If I plot them individually the curve correctly spans only between does values, however, as soon as I add hold on to plot them in the same figure the first fitobject is plotted correctly, while the second spans from -Inf to +Inf, if I change the order of fitobjects the problem remains. So the first curve is always shown correctly the following ones are not. I am not even setting any axes properties yet. Also the two fitobjects have the same Boundaries for the fit.

Example code:

plot(fitobj{1}, 'r'); hold on %curve from 0.25 to 2.25
plot(fitobj{2}, 'b'); %curve is shown from -Inf to +Inf

Do you know why this is happening? Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文