Mercurial > octave-nkf
comparison scripts/linear-algebra/housh.m @ 7125:f084ba47812b
[project @ 2007-11-08 02:29:23 by jwe]
author | jwe |
---|---|
date | Thu, 08 Nov 2007 02:29:24 +0000 |
parents | a1dbe9d80eee |
children | 76341ffda11e |
comparison
equal
deleted
inserted
replaced
7124:d07cb867891b | 7125:f084ba47812b |
---|---|
33 ## Author: A. S. Hodel | 33 ## Author: A. S. Hodel |
34 ## Created: August 1995 | 34 ## Created: August 1995 |
35 | 35 |
36 function [housv, beta, zer] = housh (x, j, z) | 36 function [housv, beta, zer] = housh (x, j, z) |
37 | 37 |
38 ## check for valid inputs | 38 if (nargin != 3) |
39 if (!isvector (x) && ! isscalar (x)) | 39 print_usage (); |
40 endif | |
41 | |
42 ## Check for valid inputs. | |
43 if (! isvector (x) && ! isscalar (x)) | |
40 error ("housh: first input must be a vector") | 44 error ("housh: first input must be a vector") |
41 elseif (! isscalar(j)) | 45 elseif (! isscalar(j)) |
42 error ("housh: second argment must be an integer scalar") | 46 error ("housh: second argment must be an integer scalar") |
43 else | 47 else |
44 housv = x; | 48 housv = x; |