在这里,OP使用
我该如何使用
gnuplot
中的floor
函数定义了round
函数。对于floor
的帮助文档如下所示:gnuplot> help floor
The `floor(x)` function returns the largest integer not greater than its
argument. For complex numbers, `floor` returns the largest integer not
greater than the real part of its argument.
我该如何使用
floor
函数?我已经尝试了:gnuplot> floor(7.3)
^
invalid command
我能否以某种方式改变数字舍入的小数位数?
round
函数定义为round(x) = x - floor(x) < 0.5 ? floor(x) : ceil(x)
。要使用 gnuplot 进行测试,您必须执行例如print floor(7)
。 - Christoph