gnuplot-如何将函数打印到txt文件
我想在gnuplot中将函数打印到文件。 这是一个最小的示例:
set print 'test.txt'
a=2
y(x)=sin(x)
set xrange [-5:5]
plot y(x)
print a
print y(x)
除最后一行外,所有线路都可以工作,这给出了一个错误:未定义的变量:x。 绘图命令如何工作,而不是打印命令。
如何将y(x)函数的x-和y-data打印到txt-file?
I would like to print a function to a file in gnuplot.
Here is a minimal example:
set print 'test.txt'
a=2
y(x)=sin(x)
set xrange [-5:5]
plot y(x)
print a
print y(x)
All lines do work, besides the last line, which gives an error: undefined variable:x.
How is it possible that the plot command works, but not the print command.
How can I print the x- and y-data of the y(x) function to a txt-file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您要查找的命令是
SET TABLE
。文件text.txt现在包含:
The command you are looking for is
set table
.The file text.txt now contains: