フィルターのクリア

Newbie question - running my script no longer puts anything in the command window

2 ビュー (過去 30 日間)
Tom
Tom 2011 年 11 月 14 日
Hi, I've made a few scripts, which work okay, but now when I run them, it no longer puts the individual calculations in the central command window. Any idea how I can make it do that again?
  3 件のコメント
Image Analyst
Image Analyst 2011 年 11 月 14 日
I don't agree with that. Simply taking a script that outputs results to the screen (via disp, fprintf, or simply leaving off a semicolon) and turning it into a function will not then suppress those outputs.
function test()
test1()
function test1()
a=10
will still print "a=10" to the command window when test1 gets executed.
Wayne King
Wayne King 2011 年 11 月 14 日
Yes, of course you're right. I was assuming that the OP had internal assignments like
a = 10;
in his script and was not seeing a as a variable in the command window.

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

採用された回答

Image Analyst
Image Analyst 2011 年 11 月 14 日
Try issuing the "echo on" command, or removing the semicolons at the ends of your lines, or making sure you didn't accidentally comment out any fprintf()'s, disp()'s, or other statements that would cause output to be sent to the command window.
  2 件のコメント
Tom
Tom 2011 年 11 月 14 日
thanks.
to issue 'echo on' do you just write 'echo on' after everything?
Image Analyst
Image Analyst 2011 年 11 月 14 日
Issue it before you want the commands to appear in the window. Of course this will just spit out the entire command, not just your results like you may be selectively outputting with disp() and fprintf(). In fact your results might still not appear if you suppressed them with semicolons or comments (the percent symbol).

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

その他の回答 (0 件)

カテゴリ

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