Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Function gnuplot在for循环的函数(tanh)中使用索引_Function_Loops_Indexing_Gnuplot - Fatal编程技术网

Function gnuplot在for循环的函数(tanh)中使用索引

Function gnuplot在for循环的函数(tanh)中使用索引,function,loops,indexing,gnuplot,Function,Loops,Indexing,Gnuplot,我正在尝试为gnuplot发出命令。 从第8列到第33列,使用tanh 所以我试着服从命令 plot for [i=1:26] 's0' u 1:(i*0.1+2):(tanh($(7+i))) w l lw 3 palette notitle 它不起作用 所以我在网上搜索的时候试了好几次 plot for [i=1:26] 's0' u 1:(i*0.1+2):(tanh("$(7+i)")) w l lw 3 palette notitle Non-numeric string found

我正在尝试为gnuplot发出命令。 从第8列到第33列,使用tanh 所以我试着服从命令

plot for [i=1:26] 's0' u 1:(i*0.1+2):(tanh($(7+i))) w l lw 3 palette notitle
它不起作用

所以我在网上搜索的时候试了好几次

plot for [i=1:26] 's0' u 1:(i*0.1+2):(tanh("$(7+i)")) w l lw 3 palette notitle
Non-numeric string found where a numeric expression was expected
plot for [i=1:26] 's0' u 1:(i*0.1+2):(tanh("${7+i}") w l lw 3 palette notitle
Non-numeric string found where a numeric expression was expected
plot for [i=1:26] 's0' u 1:(i*0.1+2):("tanh($(7+i))") w l lw 3 palette notitle
warning: Skipping data file with no valid points
然而,我无法解决这个问题


我该怎么做呢?

我相信您正在寻找
列的功能。引用文件:

列(x)
只能在表达式中作为使用
操作的一部分使用 拟合或数据文件打印。它计算为内容的数值 第x列的。请参见使用打印数据文件

所以你会想要一些类似的东西:

plot for [i=1:26] 's0' u 1:(i*0.1+2):(tanh(column(7+i))) w l lw 3 palette notitle

是的,这就是我想做的。非常感谢你