Path: news.mathworks.com!not-for-mail
From: "Alan B" <monguin61@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: modify surf default behavior
Date: Thu, 4 Jun 2009 15:28:02 +0000 (UTC)
Organization: UT
Lines: 18
Message-ID: <h08p62$lt7$1@fred.mathworks.com>
References: <h06cdq$b1h$1@fred.mathworks.com> <h08nre$m1d$1@fred.mathworks.com>
Reply-To: "Alan B" <monguin61@yahoo.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1244129282 22439 172.30.248.38 (4 Jun 2009 15:28:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 4 Jun 2009 15:28:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1446885
Xref: news.mathworks.com comp.soft-sys.matlab:544833


> Why not just write your own wrapper function? Call it
> mysurf, or something like that. This way surf will work
> as it is designed for others, or for the case in the future
> when you don't want that. (It will happen too.)
> 
> John
> 
> (I'm going to write my own wrapper for surf. I'll call
> it smurf. Of course, it will always use a pure blue
> colormap.)

Of course you're correct here, if I modify the default behavior, SOMETHING will eventually break. Its more a question of curiosity. Incidentally, I have never wanted to use surf without axis vis3d, as far as I can remember. Do you have an example where that would be desired?

There are a few other functions with behavior that bothers me. For example, 'open nonexistentFunction' errors, and since I have 'dbstop if error' enabled, every time I make a typo using 'open' at the command line, I get open.m needlessly opening up in my editor. My personal preference would be a warning or message instead of an error, and I would like to continue using 'open' instead of 'myopen' simply because I'm lazy. I have a hard time imagining how making that change might break anything. (I also wouldn't mind being able to enable 'dbstop if error' on a by-function basis)

If this can't be done, its not a big deal. Just thought I'd ask.

Thanks