【问题标题】:How to fit a function with multiple files in gnuplot如何在gnuplot中使用多个文件拟合函数
【发布时间】:2014-08-19 13:18:59
【问题描述】:

我想对 gnuplot 中的多个文件使用 fit 命令。 我知道对于一个文件,命令例如:

f(x)=a*x+b
fit f(x) 'file1' u ($18/-200):($4/200)  via a, b

现在我想要多个文件('file1'、'file2'、'file3'等)而不是单个文件,并找到适合所有数据集的最佳 a、b 参数。

这个问题与one 类似,但文件不同。

谢谢!

【问题讨论】:

    标签: gnuplot curve-fitting


    【解决方案1】:

    就像您链接的问题一样,在这里您必须将所有文件合并为一个文件。您可以使用例如命令行工具cat 即时执行此操作:

    f(x) = a*x + b
    fit f(x) '< cat file1 file2 file3' using ($18/-200):($4/200) via a,b
    

    【讨论】:

      猜你喜欢
      • 2016-08-09
      • 2021-11-30
      • 1970-01-01
      • 2012-09-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多