Matlab command window doesn't work
Mostrar comentarios más antiguos
Hi, my Matlab Command window doesn't work. The two arrows right next to the fx are missing. If I type in something trivial like "a=3" nothing happens. I jump in to the next row but nothing happens. Please help me!
Here is a picture of what i mean.

13 comentarios
jagadish bhukya
el 10 de Ag. de 2016
did u find any solution, I have a same problem
Alfredo Soldadinho
el 14 de Feb. de 2017
Editada: Alfredo Soldadinho
el 14 de Feb. de 2017
i'm with the same problem here on windows 10. do you get some solution to repair it?
PARESH RAJPUT
el 19 de Jun. de 2017
I have the same problem, please suggest some solution.
Chanel Smith
el 12 de Jul. de 2019
Editada: per isakson
el 9 de Oct. de 2021
I figured it out. Type the arrows (>>) in manually followed by any command or function and hit enter. It won't execute but the command window will start working again and the arrows will return.
konda ravali
el 25 de Jul. de 2019
it didn't workout,does anyone has any other solution?
christy abhi
el 13 de Ag. de 2020
type that two arrow(>>) manualy on the same command window,and press enter.
PIYUSH BABUBHAI ANKOLIYA
el 15 de Nov. de 2020
Senthil Vikram Vodapalli
el 27 de Nov. de 2020
Ctrl + C worked for me.
Nimitha C
el 20 de En. de 2021
Ctrl + C worked..Thanks
Pallavi Kanzarkar
el 10 de Mayo de 2021
I also have the same problem . the window shown in the picture is same with latest version, but both solutions (>>) and Ctrl + C not working... what to do??? please help...
Ahmet Turer
el 1 de Ag. de 2021
I see >> at the first line but any command returns nothing.. it is like a text editor, each time I hit enter after a command, it keeps on writing to a new line but does not execute commands.
Walter Roberson
el 1 de Ag. de 2021
As an experiment, what happens if you press control-C ?
Also, as an experiment, try using Folder View to change to a different directory, preferably a local directory on your hard drive.
Pavel Krupets
el 11 de Nov. de 2022
same for me, command window sometimes doesn't work and text is typed into editor window.
clicking with mouse on command window doesn't help
sometimes pressing CTRL+C helps, sometimes it doesn't
sometimes clearning history in command window helps
Respuestas (10)
Emily Garvin
el 10 de Oct. de 2018
15 votos
Hi. It sometimes simply happens to me when I forget to end a if/for/while statement. In this case I was unable to solve the problem by restarting the program. All I had to do was type "end" or type a closing bracket, even after reopening the program. :)
4 comentarios
Jesse Grooten
el 14 de Feb. de 2019
Editada: Walter Roberson
el 13 de Ag. de 2020
This works for me! Thanks a lot.
It doesn't work for this however.
When I for example put this into the command window:
x = randi([1,6],1);
while(x ~= 6)
end
The problem occurs as well. It'll say "an operation is in progress" and it won't stop.
Typing an extra end or two won't do anything. I still have to restart the program.
Walter Roberson
el 13 de Ag. de 2020
control-C
Rik
el 18 de Sept. de 2020
Comment posted as flag by Xianyao Liu:
You are right! Thx
Neal White
el 4 de Dic. de 2023
Editada: Neal White
el 4 de Dic. de 2023
I tried both 'end' and Ctrl+C (separately). Either solution fixes it for me.
FYI: This is the statement which triggers the problem. Notice that there is no if or while loop. The problem is the left bracket (which was an unoticed typo):
int32(2) - [int32(2.2)
Senthil Vikram Vodapalli
el 27 de Nov. de 2020
14 votos
Try Ctrl + C, it worked for me
3 comentarios
Rafael Maes
el 16 de Ag. de 2022
valeu, salvou o pai
Saikrishna Naidu
el 21 de Sept. de 2022
thank you
ilayda Nur
el 17 de Abr. de 2025
thank you so much
Steven Lord
el 5 de Feb. de 2016
2 votos
Show the lower-right corner of the Command Window. Does it say something like "Initializing" or "Busy" there?
If it shows "Initializing", how long has it been initializing? How long since you started MATLAB?
If it shows "Busy", MATLAB is running some code. Depending on what that code is doing, it may take a while and you won't be able to execute other commands while that code is running. You can type ahead but they won't get executed until MATLAB has finished its current work.
3 comentarios
BerlinM
el 5 de Feb. de 2016
Steven Lord
el 11 de En. de 2018
If MATLAB is taking a long time to initialize and start up, try the steps in this Answer. If none of those resolve the problem, you should probably contact Technical Support using the Contact Us link in the upper-right corner of this page and work with the Support staff to diagnose why initialization is taking a long time.
David Esteban Garcia Veloza
el 4 de Dic. de 2022
@Steven Lord thanks my friend, you save my thesis
Komal Gupta
el 14 de Oct. de 2018
1 voto
Exactly the same happened with me...n i typed an end and its resolved ...it works.
the cyclist
el 5 de Feb. de 2016
0 votos
You aren't really giving us much info here besides the core problem. Has it been working, and suddenly stopped? Or is this the first time you've used MATLAB?
Have you tried the obvious things like restarting MATLAB? Restarting your computer?
Have you changed anything significant on your computer before/after this problem?
This seems like a problem we might struggle to diagnose with you. You might want to contact Mathwork support.
4 comentarios
BerlinM
el 5 de Feb. de 2016
Walter Roberson
el 5 de Feb. de 2016
Do you have a startup.m in your C:\Users\S\Documents\MATLAB or in your MATLAB preferences directory ? If you do then remove them.
BerlinM
el 5 de Feb. de 2016
shashank paunikar
el 9 de Abr. de 2019
may be its because of windows 10/8 issues.
Windows activation is required to solve the issue.
i have the activate windows problem 1 year of genuine term was over
Eric Smith
el 11 de En. de 2018
0 votos
I had the same problem, but restarting the program worked for me. What was absent for me before when it wasn't working (and appears to be absent in yours) is the two right facing carrots on the command line. I've just started using the program but if someone with more experience could pinpoint why those might disappear, that would most likely fix the problem.
Eliot Mayer
el 23 de En. de 2018
0 votos
> ... What was absent for me before when it wasn't working (and appears to be absent in yours) is the two right facing carrots on the command line.
Sorry, I don't have an answer. I just want to report that I have been having the same problem lately with Matlab R2017b, running on Windows 7. I am not new to Matlab or R2017b, but the problem seems to be happening daily for the past few days. The problem is intermittent.
When the problem arises, I don't have that command prompt, and yet Matlab is not "dead". For example, I can still click on the tabs in the Editor window and view the code from the open functions. I can even edit and save those functions. I can undock and dock the Command Window (but the >> prompt is missing either way). I can type in the command window, but it dot respond.
The problem shows up when running my code. I can force Matlab to close. When I restart Matlab, I can run the same code without problem, so I don't suspect coding problems such as endless loops. Even if that was a problem, I would think the Pausing button would give back control, but it does not.
One clue: When I click the X to close Matlab, I get a message "An operation is in progress". I give it a chance to try to stop the operation, but that does not work. Then I click End Now. I just did this, re-started Matlab, and ran the same code that "got stuck". It ran normally again, completing in about 10 seconds.
5 comentarios
Walter Roberson
el 23 de En. de 2018
Eliot: would you happen to be using Microsoft OneDrive ?
Eliot Mayer
el 11 de Oct. de 2018
Walter, I didn't see your question until just now - sorry. We do have OneDrive on our work computers, though I probably was not using it actively at the time. At any rate, I have not seen this problem in a long time.
Walter Roberson
el 11 de Oct. de 2018
There was an issue with Microsoft OneDrive that had automatic download turned on; it was an interaction between MATLAB and a Microsoft change. It affect R2017b; I do not recall at the moment if it also affected R2017a. There was, if I recall, a patch for it for the affected release, and was fixed in the next release of MATLAB.
Eliot Mayer
el 11 de Oct. de 2018
Thanks, Walter. I have been procrastinating about updating Matlab but you just inspired me to do it.
Jesse Grooten
el 14 de Feb. de 2019
Editada: Jesse Grooten
el 14 de Feb. de 2019
I have the exact same problem using Matlab R2018b.
I can exec code just fine in the command window, when suddenly it stops working. The arrows next to the Fx dissapear and Run button greys out. I have the feeling I'm accidentally pressing a shortkey on my keyboard to turn it off, otherwise I have no idea why it keeps happening. I've used Matlab 3 times now and it's happened to me 3 times as well (every session once).
Restarting the program fixes the problem temporarily for me.
I do not use Microsoft One drive and the command prompt doesn't say initializing or busy either.
UPDATE:
Emily Garvins answer worked for me.
"Hi. It sometimes simply happens to me when I forget to end a if/for/while statement. In this case I was unable to solve the problem by restarting the program. All I had to do was type "end" or type a closing bracket, even after reopening the program. :)"
Jay Kirsch
el 20 de Dic. de 2021
0 votos
I am having the same problem, but...
Rebooting the laptop does not fix the problem. Nor does just restarting MATLAB.
Installing a newer MATLAB does not fix the problem! It suddenly started happening on 2020b, so I installed 2021b but that didn't resolve it.
Typing end or CTRL-C does not fix the problem.
I recently was having issues with MS Office, so I updated to O365. Is there some dependence on Excel???
Ilyes younsi
el 27 de En. de 2022
0 votos
Hi
I am new in Matlab. How open an example in Matlalb . Example
DDE with Constant Delays
1 comentario
Walter Roberson
el 17 de Sept. de 2022
At the top right of that example https://www.mathworks.com/help/matlab/math/dde-with-constant-delays.html you can click on "Copy command", and then you paste the command at your MATLAB command prompt.
If you are using an earlier version of MATLAB, the exact wording might be a bit different.
If you are using a sufficiently early version of MATLAB, there might not be a quick way to copy the example.
Muhammad Rezaul Hasan
el 17 de Sept. de 2022
0 votos
NO SOLUTION WORKED FOR ME .
1 comentario
Steven Lord
el 18 de Sept. de 2022
In that case please contact Technical Support using the Contact Support link under the Get Support heading at the end of this page and work with the Support staff to determine why the MATLAB Command Window is not working on your computer.
Categorías
Más información sobre Historical Contests en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!