plotgnuplotoctaveginput

How to disable ginput() in Octave?


I want to make Octave work only in terminal mode and options like

don't help me avoid ginput() command.


Solution

  • You can overload ginput at the beginning of the octave session (in your .octaverc file for instance)

    ginput = @() warning("ginput has been disabled")
    

    This is defining a new function with the same name. The original ginput will "screened" by this new function. But a clear ginput would get rid of the new definition. Then a new call to ginput would search for it in memory (where it is not anymore), then in the path. It will eventually find the original one.

    If you control the installation of octave on your customer's machine, just get rid of ginput.m file.