annotate scripts/deprecated/meshdom.m @ 6971:0a9d97cf2e13

[project @ 2007-10-07 19:44:53 by dbateman]
author dbateman
date Sun, 07 Oct 2007 19:44:53 +0000
parents 69e864d21c11
children 93c65f2a5668
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6555
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
1 ## Copyright (C) 1996, 1997 John W. Eaton
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
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
7 ## the Free Software Foundation; either version 2, or (at your option)
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
8 ## any later version.
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
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
16 ## along with Octave; see the file COPYING. If not, write to the Free
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
17 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
18 ## 02110-1301, USA.
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
19
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
20 ## -*- texinfo -*-
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
21 ## @deftypefn {Function File} {} meshdom (@var{x}, @var{y})
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
22 ## This function has been deprecated. Use @code{meshgrid} instead.
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
23 ## @end deftypefn
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
24
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
25 ## Author: jwe
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
26
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
27 function [xx, yy] = meshdom (x, y)
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
28
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
29 if (nargin == 2)
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
30 if (isvector (x) && isvector (y))
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
31 xx = ones (length (y), 1) * x(:).';
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
32 yy = flipud (y(:)) * ones (1, length (x));
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
33 else
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
34 error ("meshdom: arguments must be vectors");
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
35 endif
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
36 else
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
37 print_usage ();
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
38 endif
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
39
69e864d21c11 [project @ 2007-04-20 18:16:08 by jwe]
jwe
parents:
diff changeset
40 endfunction