4

Possible Duplicate:
Suppressing a function’s command window output
Suppress Output

Is there a way to "silence" the output of a Matlab function? In other words, if a function generates some displayed text in the command window, is there a way to run it in a quiet mode, where the output is suppressed?

In my case, I am using a third-party function iteratively that displays a lot of text, and I want to find a way to suppress that text without modifying the function itself. I'm thinking there must be some kind of wrapper function like quiet(thirdpartyFunction) that gives this kind of behavior. Or is this wishful thinking?

Community
  • 1
  • 1
robguinness
  • 16,266
  • 14
  • 55
  • 65

1 Answers1

4

You can probably use evalc and discard the return value.

Charles
  • 4,389
  • 2
  • 16
  • 13
  • This did the trick for me, thanks! Note to others: It is possible to also capture the function's normal output variables using evalc. See the second syntax option for how to do this, i.e.[T, X, Y, Z, ...] = evalc(S). – robguinness Nov 28 '12 at 14:22