Mercurial > hg > octave-terminal
changeset 45:53764ee8f358
[project @ 1993-08-10 22:34:19 by jwe]
author | jwe |
---|---|
date | Tue, 10 Aug 1993 22:34:19 +0000 |
parents | f3215b07c171 |
children | 80ea39e3c917 |
files | src/builtins.cc src/g-builtins.cc src/g-builtins.h |
diffstat | 3 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/builtins.cc +++ b/src/builtins.cc @@ -467,6 +467,9 @@ { "quit", 1, 0, builtin_quit, "exit Octave gracefully\n", }, + { "qzval", 3, 1, builtin_qzval, + "x = qzval(a,b): compute generalized eigenvalues \n", }, + { "rand", 2, 1, builtin_rand, "matrices with random elements\n", },
--- a/src/g-builtins.cc +++ b/src/g-builtins.cc @@ -1279,6 +1279,24 @@ } /* + * generalized eigenvalues via qz + */ +tree_constant * +builtin_qzval (tree_constant *args, int nargin, int nargout) +{ + tree_constant *retval = NULL_TREE_CONST; + + if (nargin == 3 && nargout < 2) + DLD_BUILTIN (args, nargin, nargout, qzvalue, + retval = qzvalue (args, nargin, nargout);) + else + usage ("x = qzval (A,B): compute generalized eigenvalues of \n\ + the matrix pencil (A - lambda B). A and B must be real matrices.\n"); + + return retval; +} + +/* * Random numbers. */ tree_constant *
--- a/src/g-builtins.h +++ b/src/g-builtins.h @@ -100,6 +100,7 @@ extern tree_constant *builtin_qr (tree_constant *, int, int); extern tree_constant *builtin_quad (tree_constant *, int, int); extern tree_constant *builtin_quit (tree_constant *, int, int); +extern tree_constant *builtin_qzval (tree_constant *, int, int); extern tree_constant *builtin_rand (tree_constant *, int, int); extern tree_constant *builtin_replot (tree_constant *, int, int); extern tree_constant *builtin_setstr (tree_constant *, int, int);