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 14:40:18 +0000 (UTC)
Organization: UT
Lines: 36
Message-ID: <h08mci$c8g$1@fred.mathworks.com>
References: <h06cdq$b1h$1@fred.mathworks.com> <h08968$qu$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 1244126418 12560 172.30.248.38 (4 Jun 2009 14:40:18 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 4 Jun 2009 14:40:18 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1446885
Xref: news.mathworks.com comp.soft-sys.matlab:544822


> 1. Concerning shadowing a builtin
> 
> You can create your own surf.m function. Then by using addpath or pathtool, make the path of your own function to be the top of the path.
> The command:
> >>which -all surf
> will show you that your own surf.m is shadowing the path $matlabroot\toolbox\matlab\graph3d\surf.msurf 
> 

This is how my path is set now, and my surf.m needs to call the real surf function, but currently calls itself, causing a recursion error. What can I do to force 'surf' at the command line or in a function refer to my surf function, but allow my surf function to call a different version of surf?

> 2. Concerning axis3d algorithm
> 
> 2.1  Read Section "Specifying Aspect Ratio";
> http://www.mathworks.com/access/helpdesk/help/techdoc/visualize/f4-24991.html#f4-25109
> 
> 
> 2.2 You can also edit axis.m and read the lines:
> % handle VIS3D:
>             elseif(strcmp(cur_arg,'vis3d'))
>                 set(ax(j),...
>                     'CameraViewAngle',   get(ax(j),'CameraViewAngle'),...
>                     'DataAspectRatio',   get(ax(j),'DataAspectRatio'),...
>                     'PlotBoxAspectRatio',get(ax(j),'PlotBoxAspectRatio'));
>       
> 
> Hope it helps,
> 
> Aur?lien

I've read some on the aspect ratios in the past... As I recall, that set() command makes no visible changes to the axes properties, but accessing the properties triggers some other sort of change. If there is a way to make that happen with a default axes property, I don't see it - 

set('defaultAxesCameraViewAngle',get(something))

What would I do here?

Thanks for your help.