changeset 19:cbd2e6016014

[project @ 1993-08-10 20:13:07 by jwe] (general_functions): Add balance to the list.
author jwe
date Tue, 10 Aug 1993 20:13:07 +0000
parents 15a1c5152f3d
children e67ff9b5c109
files src/builtins.cc
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/builtins.cc
+++ b/src/builtins.cc
@@ -203,6 +203,23 @@
   { "any", 2, 1, builtin_any,
     "any(X): are any elements of X nonzero?\n", },
 
+  { "balance", 4, 4, builtin_balance,
+    "balancing for algebraic and generalized eigenvalue prblems\n\
+Usage: \n\
+  algebraic eigenvalues problem:\n\
+    aa = balance(a{,opt}) or [{dd,}aa] =  balance(a{,opt})\n\
+  generalized eigenvalue problem:\n\
+    [cc, dd, aa, bb] = balance (a, b {,opt})\n\
+where 'opt' is an optional single character argument as follows: \n\
+  'N' or 'n': no balancing; arguments copied, transformation(s) \n\
+              set to identity\n\
+  'P' or 'p': permute argument(s) to isolate eigenvalues where possible\n\
+  'S' or 's': scale to improve accuracy of computed eigenvalues\n\
+  'B' or 'b': (default) permute and scale, in that order. Rows/columns of a \n\
+              (and b) that are isolated by permutation are not scaled\n\
+[dd, aa] = balance (a, opt) returns aa = dd\a*dd,\n\
+[cc, dd, aa, bb] = balance (a, b, opt) returns aa (bb) = cc*a*dd (cc*b*dd)\n", },
+
   { "clc", 1, 0, builtin_clc,
     "clear screen\n", },