Mercurial > hg > octave-lojdl
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 |
rev | line source |
---|---|
7653 | 1 ## Copyright (C) 2008 David Bateman |
2 ## | |
3 ## This file is part of Octave. | |
4 ## | |
5 ## Octave is free software; you can redistribute it and/or modify it | |
6 ## under the terms of the GNU General Public License as published by | |
7 ## the Free Software Foundation; either version 3 of the License, or (at | |
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. | |
14 ## | |
15 ## You should have received a copy of the GNU General Public License | |
16 ## along with Octave; see the file COPYING. If not, see | |
17 ## <http://www.gnu.org/licenses/>. | |
18 | |
19 ## -*- texinfo -*- | |
20 ## @deftypefn {Function File} {[@var{g}, @var{y}] =} planerot (@var{x}) | |
21 ## Given a two-element column vector, returns the | |
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 | 24 ## @end tex |
25 ## @ifnottex | |
26 ## 2 by 2 orthogonal matrix | |
27 ## @end ifnottex | |
28 ## @var{G} such that | |
29 ## @code{@var{y} = @var{g} * @var{x}} and @code{@var{y}(2) = 0}. | |
30 ## @seealso{givens} | |
31 ## @end deftypefn | |
32 | |
33 function [G, y] = planerot (x) | |
34 G = givens (x(1), x(2)); | |
35 y = G * x(:); | |
36 endfunction |