Suppress Output

I want to suppress the output of variables in a set of Matlab functions. The problem is that the author forget the ";" at many positions in the code. For debug purpose this output is useful but now I want to suppress it, without searching the whole code for the missing ";". Is there a possibility to turn off this kind of output?


You can suppress the output using evalc, but this requires you to pass your expression in as a string. For instance if you were using:

[A,B,C] = notMyFunction(d,e,f);

You can use instead

[T,A,B,C] = evalc('notMyFunction(d,e,f);');

And any output that would have gone to the console will now be buffered and stored in T.


What about calling those functions with a semicolon at the end? So instead of calling

my_function()

simply type

my_function();

Edit: http://www.mathworks.de/help/techdoc/ref/evalc.html evalc('my_function()'); Edit2: Too late