3431
|
1 ## Copyright (C) 1996, 1998 Auburn University. All rights reserved. |
|
2 ## |
|
3 ## This file is part of Octave. |
|
4 ## |
|
5 ## Octave is free software; you can redistribute it and/or modify it |
7016
|
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. |
3431
|
9 ## |
7016
|
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. |
3431
|
14 ## |
|
15 ## You should have received a copy of the GNU General Public License |
7016
|
16 ## along with Octave; see the file COPYING. If not, see |
|
17 ## <http://www.gnu.org/licenses/>. |
3431
|
18 |
|
19 ## -*- texinfo -*- |
|
20 ## @deftypefn {Function File} {[a, b] =} zgsgiv (@var{c}, @var{s}, @var{a}, @var{b}) |
3500
|
21 ## Apply givens rotation c,s to row vectors @var{a}, @var{b}. |
3438
|
22 ## No longer used in zero-balancing (__zgpbal__); kept for backward |
|
23 ## compatibility. |
3431
|
24 ## @end deftypefn |
|
25 |
|
26 ## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> |
|
27 ## Created: July 29, 1992 |
|
28 ## Convertion to Octave by R. Bruce Tenison July 3, 1994 |
|
29 |
|
30 function [a, b] = zgsgiv (c, s, a, b) |
|
31 |
|
32 t1 = c*a + s*b; |
|
33 t2 = -s*a + c*b; |
|
34 a = t1; |
|
35 b = t2; |
|
36 |
|
37 endfunction |