command window no output

378 visualizzazioni (ultimi 30 giorni)
Shane Sullivan
Shane Sullivan il 21 Set 2020
Commentato: Walter Roberson il 29 Set 2023
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 Commenti
Paul Barrette
Paul Barrette il 29 Set 2023
Modificato: Paul Barrette il 29 Set 2023
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
Walter Roberson il 29 Set 2023
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)

Accedi per commentare.

Risposta accettata

Shane Sullivan
Shane Sullivan il 25 Set 2020
Not sure what exactly was the problem, but I did the total reset function described by Jan here: https://www.mathworks.com/matlabcentral/answers/1093-how-do-i-reset-matlab-to-its-launched-state
After running it and restarting, command window works.
  3 Commenti
Image Analyst
Image Analyst il 25 Set 2020
The exclamation point runs the stuff after it as if you had typed in into a console window of the operating system.
Adam Danz
Adam Danz il 25 Set 2020
Oh, thanks! I didn't know that.

Accedi per commentare.

Più risposte (2)

Image Analyst
Image Analyst il 21 Set 2020
  4 Commenti
Shane Sullivan
Shane Sullivan il 25 Set 2020
My apologizes if I misinterperted your response.
Image Analyst
Image Analyst il 25 Set 2020
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.

Accedi per commentare.


Jan
Jan il 21 Set 2020
Modificato: Jan il 21 Set 2020
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 Commenti
Jan
Jan il 24 Set 2020
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"?
Shane Sullivan
Shane Sullivan il 25 Set 2020
The file also has nothing in it. It is blank. No, I did not create a function called display.m either.

Accedi per commentare.

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by