抑制函数的命令窗口输出 [英] Suppressing a function's command window output
本文介绍了抑制函数的命令窗口输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用的一个函数中包含 display()
(或其他在命令窗口上显示消息的东西),所以当我在命令行上输出很多东西(x 1200)时运行我的代码,这让事情变得难以跟踪和观察.
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.
推荐答案
您可以尝试将对该函数的调用包装在 evalc:
You might try wrapping the call to the function in an evalc:
evalc('out = func(arg1, arg2);');
这篇关于抑制函数的命令窗口输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文