Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Cell identifier...
Date: Sat, 16 May 2009 02:23:02 +0000 (UTC)
Organization: The MathWorks Inc
Lines: 19
Message-ID: <gul826$3s8$1@fred.mathworks.com>
References: <guihgp$q6h$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1242440582 3976 172.30.248.35 (16 May 2009 02:23:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 16 May 2009 02:23:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869871
Xref: news.mathworks.com comp.soft-sys.matlab:540379


"Oleg " <olugovoy@hotmail.com> wrote in message <guihgp$q6h$1@fred.mathworks.com>...
> Hi All,
> 
> I'm learning Matlab, and have few questions:
> 
> 1. Why cell identifier '%%' doesn't work in all my m-files? If I start new file and put %% - it works. But in my old files when I'm trying to separate code with cells - it doesn't work. I have cells mode ON, and checked all the preferences - it should work. And even if I copy my old codes to new file - cells doesn't work again. I'm depressed.
> 
> 2. Will %% work in txt files created outside Matlab and saved as .m files?
> 
> Thanks,
> Oleg

Make sure that your m-file doesn't have any syntax errors. Run m-lint on the file:

>> help mlint

Or if you have m-lint turned on the editor, check to see if the color of it (on the right edge of the editor window) is red. If it is, then there's a syntax error. In the newer releases of MATLAB, if you have a syntax error in your m-file, you won't be able to create new cells.

http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_env/brqxeeu-259.html#brqxeeu-282