command window no output
306 次查看(过去 30 天)
显示 更早的评论
So something happened and my Matlab is no longer outputing results in the command window. Even if in the command windows I type '5*5' and hit enter, it just gives me a new lines, it does not output the results. And no, there is no semicolon after it. Error messages are not displaying there, pretty much nothing. Tried restarting several times too. Any ideas?
2 个评论
Paul Barrette
2023-9-29
编辑:Paul Barrette
2023-9-29
I had the same problem as what @Shane Sullivan is describing. I spent 1-2 hours searching for an answer before finding this one (most others were about using a ';' or not, which was not relevant to my case). Coincidentally, I had to upload a new version of Matlab (2023b). Which I did - that solved the problem.
Walter Roberson
2023-9-29
Was MATLAB processing the commands? For example if you typed in a graphics command would the graphics be produced? If you typed in a for loop, was it taking time to execute the loop even if nothing was being displayed?
I am trying to distinguish here between "was not executing the commands" and "was executing the commands but no output" (and, I suppose, "was executing the commands and screen scrolled about as many lines as you would expect, but nothing of the output was visible -- such as could happen with a font problem)
采纳的回答
Shane Sullivan
2020-9-25
3 个评论
Image Analyst
2020-9-25
The exclamation point runs the stuff after it as if you had typed in into a console window of the operating system.
更多回答(2 个)
Image Analyst
2020-9-21
I'd call tech support.
It will be a fast and free fix if you just call them.
4 个评论
Image Analyst
2020-9-25
In case anyone else has that problem, it would be nice for them if you came back here and tell us what tech support's solution was, even if it was to just uninstall and re-install. Thanks in advance.
Jan
2020-9-21
编辑:Jan
2020-9-21
Check if you have shadowed the display function:
w = cellstring(which('display', '-all'));
fprintf('%s\n', w{:})
What do you see?
Maybe fprintf is impeded also. Then:
file = fullfile(tempdir, 'myOutput.txt');
fid = fopen(file, 'w');
fprintf(fid, '%s\n', w{:});
fclose(fid)
edit(file)
3 个评论
Jan
2020-9-24
The 2nd code writes the needed output to a file, not to the command window. It would help to analyse your problem, if you post the contents of this file.
Did you create a function called "display.m"?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!