[17057] in Athena Bugs
Re: sun4 8.3.15: MATLAB
daemon@ATHENA.MIT.EDU (Abby Fox)
Fri Aug 13 16:40:08 1999
Message-Id: <199908132039.QAA00664@whirlwind.mit.edu>
To: kplveroy@MIT.EDU
Cc: bugs@MIT.EDU
In-Reply-To: [17056]
Date: Fri, 13 Aug 1999 16:39:59 -0400
From: Abby Fox <ajfox@MIT.EDU>
Indeed, colormenu uses the variable 'k' and a few others which you
could conceivably overwrite your own (e.g., 'maps').
My guess is that since this is a demo function, MathWorks just didn't
bother protecting the workspace when they wrote it. You can view the
M-file with the command "type demos/colormenu" to see exactly how it
works; if you want a utility rather than a demo, you could use this
code as a template and rewrite it to do something saner with existing
variable assignments, but there are of course plenty of other ways of
changing the colormap.
Hope this helps,
Abby Fox
Academic Computing