Mercurial > hg > octave-nkf
comparison scripts/plot/ellipsoid.m @ 7306:e1e9bb54a440
[project @ 2007-12-12 16:47:07 by jwe]
author | jwe |
---|---|
date | Wed, 12 Dec 2007 16:47:07 +0000 |
parents | 84a2e24c75c8 |
children | 967c15c5e265 |
comparison
equal
deleted
inserted
replaced
7305:84a2e24c75c8 | 7306:e1e9bb54a440 |
---|---|
1 ## Copyright (C) 2007 Sylvain Pelissier <sylvain.pelissier@gmail.com> | 1 ## Copyright (C) 2007 Sylvain Pelissier |
2 ## | 2 ## |
3 ## This program is free software; you can redistribute it and/or modify | 3 ## This file is part of Octave. |
4 ## it under the terms of the GNU General Public License as published by | |
5 ## the Free Software Foundation; either version 2 of the License, or | |
6 ## (at your option) any later version. | |
7 ## | 4 ## |
8 ## This program is distributed in the hope that it will be useful, | 5 ## Octave is free software; you can redistribute it and/or modify it |
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of | 6 ## under the terms of the GNU General Public License as published by |
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 7 ## the Free Software Foundation; either version 3 of the License, or (at |
11 ## GNU General Public License for more details. | 8 ## your option) any later version. |
9 ## | |
10 ## Octave is distributed in the hope that it will be useful, but | |
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 ## General Public License for more details. | |
12 ## | 14 ## |
13 ## You should have received a copy of the GNU General Public License | 15 ## You should have received a copy of the GNU General Public License |
14 ## along with this program; if not, write to the Free Software | 16 ## along with Octave; see the file COPYING. If not, see |
15 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 ## <http://www.gnu.org/licenses/>. |
16 | 18 |
17 ## -*- texinfo -*- | 19 ## -*- texinfo -*- |
18 ## @deftypefn {Function File} {[@var{x}, @var{y}, @var{z}] =} ellipsoid (@var{xc},@var{yc}, @var{zc}, @var{xr}, @var{yr}, @var{zr}, @var{n}) | 20 ## @deftypefn {Function File} {[@var{x}, @var{y}, @var{z}] =} ellipsoid (@var{xc},@var{yc}, @var{zc}, @var{xr}, @var{yr}, @var{zr}, @var{n}) |
19 ## @deftypefnx {Function File} {} ellipsoid (@var{h}, @dots{}) | 21 ## @deftypefnx {Function File} {} ellipsoid (@var{h}, @dots{}) |
20 ## Generates three matrices in @code{meshgrid} format, of an ellipsoid. | 22 ## Generate three matrices in @code{meshgrid} format that define an |
21 ## Called with no return arguments, @code{ellipsoid} calls directly | 23 ## ellipsoid. Called with no return arguments, @code{ellipsoid} calls |
22 ## @code{surf (@var{x}, @var{y}, @var{z})}. If an axes handle is passed | 24 ## directly @code{surf (@var{x}, @var{y}, @var{z})}. If an axes handle |
23 ## as the first argument, the the surface is plotted to this set of axes. | 25 ## is passed as the first argument, the the surface is plotted to this |
26 ## set of axes. | |
24 ## @seealso{sphere} | 27 ## @seealso{sphere} |
25 ## @end deftypefn | 28 ## @end deftypefn |
26 | 29 |
27 function [xx, yy, zz] = ellipsoid(varargin) | 30 ## Author: Sylvain Pelissier <sylvain.pelissier@gmail.com> |
31 | |
32 function [xx, yy, zz] = ellipsoid (varargin) | |
28 | 33 |
29 [h, varargin, nargin] = __plt_get_axis_arg__ ((nargout > 0), "ellipsoid", | 34 [h, varargin, nargin] = __plt_get_axis_arg__ ((nargout > 0), "ellipsoid", |
30 varargin{:}); | 35 varargin{:}); |
31 | 36 |
32 if (nargin != 6 && nargin != 7) | 37 if (nargin != 6 && nargin != 7) |