This document demonstrates how to check if a variable has previously been defined in the gnuplot script.
Example from the document:
a = 10
if (exists("a")) print "a is defined"
if (!exists("b")) print "b is not defined"
However, is it possible to check whether a function has been previously defined?
In other words, is there a way to do the following:
f(x) = 2*x
if (exist("f(x)") print "Function is defined"
Thank!
kirbo source
share