本文介绍了如何将线性拟合图减小到一定间隔?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要做的是将两个线性函数拟合到我的数据中.我知道如何为各种拟合功能选择数据.我的问题是我只希望拟合的线在一定间隔内被绘制.我到目前为止所做的事情:

what i do is to fit two linear function´s to my data.i know how to select the data for the various fitting functions. My problem is that i want the fitted lines only to be plottet in a certain interval.What i did till now:

f(x) = a*x + b; fit [800:1250][-2:8] f(x) 'Daten.txt' u 1:2 via a,b

g(x) = c*x + d; fit [1258:1650][-2:8] g(x) 'Daten.txt' u 1:2 via c,d

plot "Daten.txt" u 1:2 w l, f(x) t title_f(a,b), g(x) t title_g(c,d)

它导致

我不允许张贴图片...

a picture i´m not allowed to post...

我怎样才能使绿色的fittin线仅在800-1200范围内运行,而蓝色的fittin线从1100端开始?

How can i make the green fittin-line only to run from 800-1200 and the blue fitting-line from 1100-end?

推荐答案

语法

plot [xmin:xmax] f(x)

(与fit相同)将绘图限制在一定范围内.所以,你可以做类似的事情

(the same as for fit) restricts the plot to a certain range. So, you could do something like

plot "Daten.txt" u 1:2 w l, [800:1200] f(x) t title_f(a,b), [1100:] g(x) t title_g(c,d)

这篇关于如何将线性拟合图减小到一定间隔?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 15:37