MATLAB Answers


Fix Command Window to Accept Input from Top Down

Asked by Diego
on 19 Jul 2013


|  CW  |  ED  |  WS  |       CW = Command Window
|      |      |      |       ED = Editor
|      |      |------|       WS = Workspace
|      |      |  CF  |       CF = Current Folder
|      |      |      |

Above is how I have my workspace setup. So I start typing on the top left in the command window, and as output comes out/I continue typing it starts to go down until eventually Im typing right above the start menu. I moved it ot the left because the same thing happened on the right but dropbox notifications frequently obscured it.

My question is How do I make it so that in the command window, Im typing on the top and all output appears below it? In other words, my typing/new commands always stays on the top of the window, as opposed to dropping down?




No products are associated with this question.

2 Answers

Answer by per isakson
on 19 Jul 2013
Edited by per isakson
on 19 Jul 2013

Matlab doesn't work that way. However, you can achieve a similar result (user experience) the following way:

  • type the commands in the editor (scrap function or script)
  • use cell mode

I do that a lot.

By typing in the editor you build a history without typos. (You don't display the History window.)


Matt J
Answer by Matt J
on 19 Jul 2013
Edited by Matt J
on 19 Jul 2013

In other words, my typing/new commands always stays on the top of the window, as opposed to dropping down

Even if that were possible, you would be wasting a lot of screen space much of the time. Basically, with what you're asking for, you would only ever see the most recent output in the window, as if the CLC command were automatically done after every command. Unless it were a long output, most of the window would be blank.

Seems like the better solution is just to resize the command window so that the lower edge is sufficiently above the bottom of the screen, where notifications can't overlap it. You would waste less window that way.


on 19 Jul 2013

how do you mean? Wouldn't typing be like this?

|  command1   |           |  command2   |
|  output_11  |           |  output_21  |
|  output_12  |           |  output_22  |
|  output_13  |           |  output_23  |
|  output_14  |           |             | 
|  output_15  |           |             |
|  output_16  |           |  command1   |  
|             |           |  output_11  | 
|             |           |  output_12  |  
|             |           |  output_13  |
|             |           |  output_14  |
|             |           |  output_15  |
|             |           |  output_16  |
Matt J
on 19 Jul 2013

Would it? You never said how what you would want the behavior to be when displaying of previous commands and their outputs. Anyway, I don't think it's possible.

And again, resizing the MATLAB window seems the easiest solution if this whole thing is indeed motivated simply by a desire to prevent taskbar notifications from blocking your view.

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply today