How can I get an outline (window) of my script?

22 vues (au cours des 30 derniers jours)
Alexandra Piller
Alexandra Piller le 17 Jan 2024
Does anybody know how to can get an outline of the script in Matlab? I organised my codes with sections (see toy example below). However, to navigate between the sections, an outline window (as in e.g. R-Studio or Visual Studio Code) would be very useful. I know that I can collabs each section to simplify navigation but I'd prefer an outline. Thanks for your help!
%% Section 1
y=1+2;
%% Section 2
x=2+3;
%% Section 3
...
  1 commentaire
Ganesh
Ganesh le 17 Jan 2024
You can use the "details" window to navigate between the sections of a matlab code.
To enable it, you can simply Right-Click on the file and click on "Show Details".
Hope this helps!

Connectez-vous pour commenter.

Réponse acceptée

Cris LaPierre
Cris LaPierre le 17 Jan 2024
In the Editor Tab, use the Go To dropdown menu to jump to a selected section in your script
Here's an example using the code you shared above.
  1 commentaire
Cris LaPierre
Cris LaPierre le 17 Jan 2024
Déplacé(e) : Cris LaPierre le 17 Jan 2024
Live Scripts allow you to insert a Table of Contents. See here: https://www.mathworks.com/help/matlab/matlab_prog/format-live-scripts.html

Connectez-vous pour commenter.

Plus de réponses (1)

Steven Lord
Steven Lord le 17 Jan 2024
With the Live Script open in the Live Editor, open the Live Editor tab in the Toolstrip. If you click on the downward pointing triangle under "Go To" in the Navigate section you can jump to individual sections, go to a specific line, or move up or down by section. Additionally, the Bookmark item in that same Navigate section allows you to set breakpoints on specific lines and jump between them.

Catégories

En savoir plus sur Data Type Identification dans Help Center et File Exchange

Tags

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by