|
"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
|