Function gnuplot在for循环的函数(tanh)中使用索引
我正在尝试为gnuplot发出命令。 从第8列到第33列,使用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
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
是的,这就是我想做的。非常感谢你