6

When using Code Sections / Code Cells / Cell Mode (%%) in MATLAB R2014a and R2014b (see these two MathWorks links), the section highlighting within the editor works fine with both scripts and functions.
However, the sections are shown correctly in the Details Panel of the Current Folder window only for scripts and not for functions, see the lower left corner in the following two screenshots:

Section View in Current Folder is working for a Script

Section View in Current Folder is not working for a Function

Is there a setting to change this behaviour? I do very much appreciate the section view in the Details Panel of the Current Folder window, as it shows the overall structure of the script and allows easy navigation, which I would like to get for functions as well.

1
  • 3
    I didn't even know this feature exists. -.- Commented Jul 11, 2017 at 15:55

1 Answer 1

1

There currently doesn't appear to be any way to customize the Details Panel of the Current Folder browser. It shows you the underlying structure of a file in a way that is specific to the type of file. For scripts it shows the section structure, since sections are the only real way to partition a script.

For functions, partitioning of the code is generally accomplished by grouping operations into subfunctions, so the local function structure in the file is shown (but nested functions, for whatever reason, are not). Additionally, class files will display object properties and methods, while MAT-files will display their variable contents.

Sign up to request clarification or add additional context in comments.

2 Comments

I guess there's no way around it but to accept this fact. Thank you for your answer and feel free to submit this as a feature request if you think this might be a good idea, as I'm sure that you are a part of the MathWorks community.
I think the most annoying part of this is that nested functions do not appear in the details panel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.