Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
collapse code option missing

Subject: collapse code option missing

From: Alex

Date: 4 Nov, 2011 21:36:14

Message: 1 of 2

I was working on a program I am building when I noticed that the option to collapse (or fold, I think is what its called in matlab?) was missing. I opened up an older m-file I worked on and it still has the option. I provided a link to a screenshot of the 2 side by side. The code on the left is the one I am having the problem with, and the one on the right has the "+" and "-" boxes to expand or collapse statements like I want.

http://farm7.static.flickr.com/6097/6313364978_b28b982bc1_b.jpg

Anyone know how to enable that again?

Thanks, Alex

Subject: collapse code option missing

From: Steven_Lord

Date: 7 Nov, 2011 15:21:44

Message: 2 of 2



"Alex " <blue.harvest.83@gmail.com> wrote in message
news:j91lse$nfo$1@newscl01ah.mathworks.com...
> I was working on a program I am building when I noticed that the option to
> collapse (or fold, I think is what its called in matlab?) was missing. I
> opened up an older m-file I worked on and it still has the option. I
> provided a link to a screenshot of the 2 side by side. The code on the
> left is the one I am having the problem with, and the one on the right has
> the "+" and "-" boxes to expand or collapse statements like I want.
>
> http://farm7.static.flickr.com/6097/6313364978_b28b982bc1_b.jpg
>
> Anyone know how to enable that again?

Fix the red errors identified by Code Analyzer in the left function. If your
function file is not a valid function file due to a red error, how could you
fold it correctly?

BTW, I encourage you NOT to program your GUI using lots of global variables.
Another function you or your GUI's user executes could easily change a
variable A or On or the like in the global workspace without realizing it's
going to break your GUI. Use the handles structure instead.

http://www.mathworks.com/help/techdoc/creating_guis/f5-998197.html

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us