フィルターのクリア

Don't let the function display any output

38 ビュー (過去 30 日間)
ben dp
ben dp 2017 年 5 月 2 日
コメント済み: Stephen23 2017 年 5 月 3 日
Hello guys,
I have a function which I can't access to the code and so, I can't change anything within the function. The problem is that the function is printing in the command window every time. How can I prevent that function to print without getting inside the function? I've of course already tried ; after calling it.
Thank you!
  1 件のコメント
Stephen23
Stephen23 2017 年 5 月 3 日
@ben dp: point out to whomever wrote that code that uncontrolled printing to the command window is an insult to humanity, slows the code, irritates the user, and is ultimately useless because no one can understand five hundred lines a second of scrolled text.

サインインしてコメントする。

回答 (2 件)

Guillaume
Guillaume 2017 年 5 月 2 日
編集済み: Guillaume 2017 年 5 月 2 日
You could wrap the call to the function in evalc. The downside, as with any eval function is that it is slower and you lose syntax highlighting.
Probably best is to live with the output to the command window.
  7 件のコメント
ben dp
ben dp 2017 年 5 月 3 日
Disp is to display in the command window, but that's not what I want to do. Or I didn't understand your idea...
Walter Roberson
Walter Roberson 2017 年 5 月 3 日
evalc('vl_hog(single(imgExtended(l-8:l+7,c-4:c+3,:)), 8, ''verbose'',''numOrientations'', numOrientations);')

サインインしてコメントする。


Rafi egal
Rafi egal 2017 年 5 月 3 日
編集済み: Rafi egal 2017 年 5 月 3 日
you could use clc if you have no terminal output above which is to be used.
Maybe you can temporarily disable warnings before calling the function and after goint out of that function enable them once again: https://ch.mathworks.com/help/matlab/matlab_prog/suppress-warnings.html

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by