Filter löschen
Filter löschen

How can I log executed cells (when using editor in cell-mode) to command history?

1 Ansicht (letzte 30 Tage)
I am using scripts in cell mode to be able to quickly run a few lines on pressing Ctrl+Enter. However, when I run lines this way, they don't show up in the command history. Is there any way to enable this?
The only alternative I know is to highlight the code I want to run, and to then press F9. This copies the code to the command line and executes it, so it ends up in the command history (which is good). But the workflow is not as nice as the Ctrl+Enter of cell mode.

Antworten (1)

Ankita Nargundkar
Ankita Nargundkar am 6 Mär. 2017
I am assuming by cell mode you mean "Run Section" option because that is what happens when you use Ctrl+Enter. Yes, it is not shown in the command history because that is the expected behavior.
Cell mode (Run Section) is to debug applications and run a module of code at once. Even if you are unable to show commands in command history all variables still exist in workspace.
For more information you can refer to this stack overflow discussion and this MATLAB documentation

Kategorien

Mehr zu Control Information finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by