Newbie question - running my script no longer puts anything in the command window
Show older comments
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 Comments
Wayne King
on 14 Nov 2011
Are you sure these are scripts and not functions? If you have them declared as functions, they only output what you have declared as output arguments. Can you include a small example (better not to include some large script)
Image Analyst
on 14 Nov 2011
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
on 14 Nov 2011
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.
Accepted Answer
More Answers (0)
Categories
Find more on Entering Commands in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!