annotate scripts/deprecated/meshdom.m @ 7017:a1dbe9d80eee

[project @ 2007-10-12 21:27:11 by jwe]
author jwe
date Fri, 12 Oct 2007 21:27:37 +0000
parents 93c65f2a5668
children 8e5371d47da6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7017
a1dbe9d80eee [project @ 2007-10-12 21:27:11 by jwe]
jwe
parents: 7016
diff changeset
1 ## Copyright (C) 1996, 1997, 2007 John W. Eaton
6555
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
2 ##
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
3 ## This file is part of Octave.
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
4 ##
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
6 ## under the terms of the GNU General Public License as published by
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6555
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6555
diff changeset
8 ## your option) any later version.
6555
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
9 ##
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
13 ## General Public License for more details.
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
14 ##
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6555
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6555
diff changeset
17 ## <http://www.gnu.org/licenses/>.
6555
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
18
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
19 ## -*- texinfo -*-
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
20 ## @deftypefn {Function File} {} meshdom (@var{x}, @var{y})
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
21 ## This function has been deprecated. Use @code{meshgrid} instead.
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
22 ## @end deftypefn
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
23
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
24 ## Author: jwe
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
25
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
26 function [xx, yy] = meshdom (x, y)
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
27
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
28 if (nargin == 2)
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
29 if (isvector (x) && isvector (y))
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
30 xx = ones (length (y), 1) * x(:).';
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
31 yy = flipud (y(:)) * ones (1, length (x));
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
32 else
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
33 error ("meshdom: arguments must be vectors");
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
34 endif
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
35 else
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
36 print_usage ();
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
37 endif
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
38
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
39 endfunction