annotate scripts/linear-algebra/planerot.m @ 9211:f0c3d3fc4903

Simplify Texinfo documentation in .m scripts by removing redundant @iftex calls
author Rik <rdrider0-list@yahoo.com>
date Sun, 17 May 2009 14:39:39 -0700
parents 23c248d415b5
children 16f53d29049f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7653
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
1 ## Copyright (C) 2008 David Bateman
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
2 ##
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
3 ## This file is part of Octave.
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
4 ##
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
6 ## under the terms of the GNU General Public License as published by
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
8 ## your option) any later version.
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
9 ##
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
13 ## General Public License for more details.
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
14 ##
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
17 ## <http://www.gnu.org/licenses/>.
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
18
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
19 ## -*- texinfo -*-
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
20 ## @deftypefn {Function File} {[@var{g}, @var{y}] =} planerot (@var{x})
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
21 ## Given a two-element column vector, returns the
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
22 ## @tex
7989
23c248d415b5 Various doc fixes. Readd cellidx
David Bateman <dbateman@free.fr>
parents: 7653
diff changeset
23 ## $2 \times 2$ orthogonal matrix
7653
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
24 ## @end tex
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
25 ## @ifnottex
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
26 ## 2 by 2 orthogonal matrix
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
27 ## @end ifnottex
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
28 ## @var{G} such that
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
29 ## @code{@var{y} = @var{g} * @var{x}} and @code{@var{y}(2) = 0}.
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
30 ## @seealso{givens}
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
31 ## @end deftypefn
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
32
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
33 function [G, y] = planerot (x)
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
34 G = givens (x(1), x(2));
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
35 y = G * x(:);
d9eb2aec6d84 Add the planerot function
David Bateman <dbateman@free.fr>
parents:
diff changeset
36 endfunction