changeset 30:9239bd2337bb

[project @ 1993-08-10 21:46:34 by jwe] (builtin_balance): Fix typo in doc string. (builtin_givens): New function.
author jwe
date Tue, 10 Aug 1993 21:46:34 +0000
parents 69497d3b3b75
children 19b973bc5464
files src/g-builtins.cc
diffstat 1 files changed, 19 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/g-builtins.cc	Tue Aug 10 21:42:45 1993 +0000
+++ b/src/g-builtins.cc	Tue Aug 10 21:46:34 1993 +0000
@@ -166,8 +166,8 @@
 {
   tree_constant *retval = NULL_TREE_CONST;
   if (nargin <= 1 || nargin > 4 || nargout < 1 || nargout > 4)
-    usage ("[aa {,dd}] = balance (a, {opt}) or \n\
-[aa, bb {,cc, dd}] = balance (a, b {,opt}), opt = 'P' or 'S'");
+    usage ("[{dd,} aa] = balance (a, {opt}) or \n\
+[{cc, dd,} aa, bb] = balance (a, b {,opt}), opt = 'P' or 'S'");
   else
     {
       DLD_BUILTIN (args, nargin, nargout, balance,
@@ -1596,7 +1596,23 @@
 }
 
 /*
- * Hessenburg Decomposition
+ * Givens rotation
+ */
+tree_constant *
+builtin_givens (tree_constant *args, int nargin, int nargout)
+{
+  tree_constant *retval = NULL_TREE_CONST;
+
+  if (nargin == 3 && (nargout == 1 || nargout == 2 ))
+    retval = givens (args, nargin, nargout);
+  else
+    usage ("[c, s] = givens (x,y)\n            G = givens (x,y)");
+
+  return retval;
+}
+
+/*
+ * Hessenberg Decomposition
  */
 tree_constant *
 builtin_hess (tree_constant *args, int nargin, int nargout)