How can I modify a command from the command window?

Hello,
I have R2017b version. I am typing commands (in command window) but sometimes I need to change them when I type incorrectly. The program does not allow me to do that. How can I rearrange the command I previously put?
Thank you.

5 comentarios

Geoff Hayes
Geoff Hayes el 9 de Abr. de 2020
Sena - please clarify what you mean by the program does not allow me to do that. If I start typing a command in the command window, I can "backtrack" and change commands, fix typos, etc.
When I want to change command I wrote, I cannot delete or modify it. Matlab send me at the end of the command window.
darova
darova el 9 de Abr. de 2020
Maybe you want to use editor instead of command window
Geoff Hayes
Geoff Hayes el 9 de Abr. de 2020
I think that so long as you haven't tried to execute the command, you should be able to modify it. But if you have executed the command then - to change it - you will need to copy and paste the original command in and edit it, or use the up arrow key to cycle through the commands until you get to the one you want, or use short-cuts (start typing the first couple of characters of the command that you want to execute).
Yes I did it! Thank you very much for your help.

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 9 de Abr. de 2020

0 votos

In the command window, press up-arrow repeatedly until it offers you the command you wish to edit. Then use the arrow keys or mouse positioning or key sequences such as control-A or control-E in order to move around in the command and do the editing you want.

2 comentarios

Yes, you are right, arrows helped me to modify them. Thank you for your help.
darova
darova el 10 de Abr. de 2020
I think this answer should be accepted

Iniciar sesión para comentar.

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Preguntada:

el 9 de Abr. de 2020

Comentada:

el 10 de Abr. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by