comparison scripts/special-matrix/hankel.m @ 904:3470f1e25a79

[project @ 1994-11-09 21:22:15 by jwe]
author jwe
date Wed, 09 Nov 1994 21:22:15 +0000
parents 16a24e76d6e0
children 3f257ab07921
comparison
equal deleted inserted replaced
903:b3692d63cca3 904:3470f1e25a79
1 # Copyright (C) 1993 John W. Eaton 1 # Copyright (C) 1993, 1994 John W. Eaton
2 # 2 #
3 # This file is part of Octave. 3 # This file is part of Octave.
4 # 4 #
5 # Octave is free software; you can redistribute it and/or modify it 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 the 6 # under the terms of the GNU General Public License as published by the
30 # See also: vander, hadamard, hilb, invhilb, toeplitz 30 # See also: vander, hadamard, hilb, invhilb, toeplitz
31 31
32 if (nargin == 1) 32 if (nargin == 1)
33 r = c; 33 r = c;
34 elseif (nargin != 2) 34 elseif (nargin != 2)
35 error ("usage: hankel (c, r)"); 35 usage ("hankel (c, r)");
36 endif 36 endif
37 37
38 [c_nr, c_nc] = size (c); 38 [c_nr, c_nc] = size (c);
39 [r_nr, r_nc] = size (r); 39 [r_nr, r_nc] = size (r);
40 40
49 if (r_nr != 1) 49 if (r_nr != 1)
50 r = r'; 50 r = r';
51 endif 51 endif
52 52
53 if (r (1) != c (1)) 53 if (r (1) != c (1))
54 disp ("Column wins anti-diagonal conflict"); 54 warning ("hankel: column wins anti-diagonal conflict");
55 endif 55 endif
56 56
57 # This should probably be done with the colon operator... 57 # This should probably be done with the colon operator...
58 58
59 nc = length (r); 59 nc = length (r);