"Alex " <firstname.lastname@example.org> wrote in message news:email@example.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.