MATLAB Answers


How to fix the wrong input prompt in the main processing window of matlab?

Asked by Muhammad Hasan on 19 Sep 2013

Everything was ok. But suddenly it stuck and i again opened it. But input prompt was showing ";;" instead of ">>" and when i typed 'j' is displayed it as 'g'. When I typed 'g', it displayed it as 'd'. Same problem with every letter. How to fix it? I already restarted computer and also reinstalled matlab2012b but problem still exists.

Kindly help me!


  1 Comment

This is obviously the strangest problem posted in this forum. Therefore it is my

 question of the week!

Does it concern only Matlab or are other programs affected also?


No products are associated with this question.

3 Answers

Answer by Jan Simon
on 19 Sep 2013
Edited by Jan Simon
on 19 Sep 2013
 Accepted answer

Please try to change the display font. I know this can be hard when you cannot read displayed messages. Perhaps this helps:

matchClass     = 'javax.swing.JTextArea$AccessibleJTextArea';
cmdWinDoc      = com.mathworks.mde.cmdwin.CmdWinDocument.getInstance;
cmdWinListener = cmdWinDoc.getDocumentListeners;
for iL = 1:length(cmdWinListener)
   if isa(cmdWinListener(iL), matchClass)
      jTextArea = cmdWinListener(iL);
Data = java.awt.Font('Arial', java.awt.Font.PLAIN, 14);

Or use other fonts instead of Arial.

See also

If this works, the font file is damaged. Then the problem should appear also in a text editor, when the specific font is selected. And re-installing Matlab cannot solve the problem. But I never have heard of such a problem and it is not trivial do destroy a font file such, that it is only re-ordered and not damaged completely. Therefore other reasons are more likely.

  1 Comment

Dear Simon, Should I run this code everytime when I switch on my computer? Today, when I switched my computer, that problem happened again . Then, I again run this code and it worked nice. How to fix this issue permanently?


Answer by Muhammad Hasan on 19 Sep 2013

It is only affecting the matlab main processing window. If i search anything in matlab, then it works well. All other softwares like Microsfot Words are working well.


Answer by Muhammad Hasan on 19 Sep 2013

Thanks dear Simon. The code which you sent worked. I just pasted it there and 'Enter' and everything became normal.I am very thankful to you. What do you think the reason behind it? Font file damaged?



Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!