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?
"%%" is simply text. It should work in the Editor with all files that end with a ".m" extension, regardless of how old they are or what application created them. If you're creating them in another application, just be sure the extension is correct.
"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.
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.