Disable plots in Matlab

前端 未结 3 1138
不知归路
不知归路 2021-01-02 04:12

I have some programs written in Matlab that I need to run several times for some reasons (debugging, testing with different input, etc...)

But, there are a lot\'s of

3条回答
  •  误落风尘
    2021-01-02 05:07

    You could run matlab from the command line with:

    matlab -nojvm
    

    but then you don't get the GUI at all. Alternatively, you could write a file 'plot.m':

    function h = plot(varargin)
      h = [];
    end
    

    which doesn't do anything. If this is in the working directory (or somewhere else near the top of the path), then plot will call your function instead of the 'real' plot. You'd need to do the same from any other graphing functions you call.

    The closest way I know of 'turning off plotting' would be a folder of such functions that you can add to the path to disable plotting, and remove to enable.

提交回复
热议问题