This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, please read below for any possible workarounds:
This bug has been fixed for Release 14 (R14). For previous releases, please read below for any possible workarounds:
This is a bug in MATLAB that is being investigated by our development staff.
In order to work around this issue, select all the text in the file and then correct for formatting; using the "Smart Indent" option should help restore the coloring of keywords.
Best Answer