Mercurial > hg > octave-terminal
changeset 38:cd5ac1c52ea6
[project @ 1993-08-10 22:12:50 by jwe]
author | jwe |
---|---|
date | Tue, 10 Aug 1993 22:12:50 +0000 |
parents | 2947a1ad8ca3 |
children | 82c3febbaf04 |
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 @@ -509,6 +509,9 @@ { "svd", 2, 3, builtin_svd, "[U,S,V] = svd(X): return SVD of X\n", }, + { "syl", 4, 1, builtin_syl, + "X = syl (A, B, C): solve the Sylvester equation A X + X B + C = 0\n", }, + { "warranty", 1, 0, builtin_warranty, "describe copying conditions\n", },
--- a/src/g-builtins.cc +++ b/src/g-builtins.cc @@ -68,6 +68,7 @@ #include "f-rand.h" #include "f-schur.h" #include "f-svd.h" +#include "f-syl.h" #include "procstream.h" #include "error.h" @@ -1573,6 +1574,23 @@ } /* + * Sylvester equation solver. + */ +tree_constant * +builtin_syl (tree_constant *args, int nargin, int nargout) +{ + tree_constant *retval = NULL_TREE_CONST; + + if ((nargin == 4) && (nargout == 1)) + DLD_BUILTIN (args, nargin, nargout, syl, + retval = syl (args, nargin, nargout);) + else + usage ("X = syl (A,B,C)"); + + return retval; +} + +/* * Schur Decomposition */ tree_constant *
--- a/src/g-builtins.h +++ b/src/g-builtins.h @@ -114,6 +114,7 @@ extern tree_constant *builtin_sum (tree_constant *, int, int); extern tree_constant *builtin_sumsq (tree_constant *, int, int); extern tree_constant *builtin_svd (tree_constant *, int, int); +extern tree_constant *builtin_syl (tree_constant *, int, int); extern tree_constant *builtin_warranty (tree_constant *, int, int); extern tree_constant *builtin_zeros (tree_constant *, int, int);