如何“沉默"? Matlab函数? [英] How to "silence" a Matlab function?
问题描述
可能重复:
抑制函数的命令窗口输出
抑制输出
Possible Duplicate:
Suppressing a function’s command window output
Suppress Output
有没有一种方法可以使"Matlab"函数的输出静音"?换句话说,如果一个函数在命令窗口中生成了一些显示的文本,是否有一种方法可以在安静模式下运行它,从而抑制输出?
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?
对于我来说,我正在迭代地使用显示大量文本的第三方函数,并且我想找到一种在不修改函数本身的情况下隐藏该文本的方法.我在想必须有某种类似quiet(thirdpartyFunction)
的包装函数才能提供这种行为.还是这种如意算盘的想法?
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?
推荐答案
您可能可以使用evalc
并放弃返回值.
You can probably use evalc
and discard the return value.
这篇关于如何“沉默"? Matlab函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!