Suppressing a function's command window output

Ali picture Ali · Jun 12, 2010 · Viewed 19.5k times · Source

A function I'm using has display() in it (or other things that display messages on command window), so it outputs a lot of things (x 1200) on command line when I run my code, which makes things hard to track and observe.

Is there a way to suppress the output of this specific function? Ending the statement with semicolon obviously doesn't help.

Answer

SCFrench picture SCFrench · Jun 12, 2010

You might try wrapping the call to the function in an evalc:

evalc('out = func(arg1, arg2);');