How to use MATLAB editor more effectively

5 visualizaciones (últimos 30 días)
Ken Bannister
Ken Bannister el 17 de Ag. de 2022
Comentada: Ken Bannister el 17 de Ag. de 2022
Still new to some features of MATLAB. I notice this in the MATLAB editor window. On the left edge of the window when I enter some
code, especially for-next loops and if statements, there are lines connecting boxes. There are some horizontal dashes here and there, also.
Not clear what the dashes mean.
The boxes have + signs in them. I found out that by clicking these boxes, code contained in the relevant for-next is collapsed, which
is very helpful sometimes. Is any of this documented anywhere? What else can be done with this capability? I have been converting some legacy FORTRAN 77 "spaghetti" code to MATLAB, and the process is rather painful and slow. Converting FORTRAN if statements and GO TO statements to their MATLAB equivalents can be tricky. Perhaps knowing more about this MATLAB editor capability would help me speed up my conversion work? Are there other editor tools that would help understand the program flow of a MATLAB program?

Respuesta aceptada

Steven Lord
Steven Lord el 17 de Ag. de 2022
What you're describing is the code folding functionality. See the "Fold Code" section on this documentation page for more information.

Más respuestas (0)

Categorías

Más información sobre Fortran with MATLAB en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by