From 45794fb198c8fac02b5c82b6ac3f1e17bac1075e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Tue, 19 Jan 2021 22:08:40 +0100 Subject: =?UTF-8?q?Permutationen=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buch/chapters/40-eigenwerte/beispiele/jp.maxima | 19 +++++++++ buch/chapters/40-eigenwerte/beispiele/n.m | 55 +++++++++++++++++++++++++ buch/chapters/40-eigenwerte/beispiele/n.maxima | 20 +++++++++ 3 files changed, 94 insertions(+) create mode 100644 buch/chapters/40-eigenwerte/beispiele/jp.maxima create mode 100644 buch/chapters/40-eigenwerte/beispiele/n.m create mode 100644 buch/chapters/40-eigenwerte/beispiele/n.maxima (limited to 'buch/chapters/40-eigenwerte/beispiele') diff --git a/buch/chapters/40-eigenwerte/beispiele/jp.maxima b/buch/chapters/40-eigenwerte/beispiele/jp.maxima new file mode 100644 index 0000000..a80a0a2 --- /dev/null +++ b/buch/chapters/40-eigenwerte/beispiele/jp.maxima @@ -0,0 +1,19 @@ +/* + * jp.maxima -- potenzen von Jordan-Blöcken + * + * (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule + */ + +A: matrix( +[lambda, 1, 0, 0, 0, 0 ], +[ 0,lambda, 1, 0, 0, 0 ], +[ 0, 0,lambda, 1, 0, 0 ], +[ 0, 0, 0,lambda, 1, 0 ], +[ 0, 0, 0, 0,lambda, 1 ], +[ 0, 0, 0, 0, 0,lambda ] +); +B: A.A; +B: B.A; +B: B.A; +B: B.A; +B: B.A; diff --git a/buch/chapters/40-eigenwerte/beispiele/n.m b/buch/chapters/40-eigenwerte/beispiele/n.m new file mode 100644 index 0000000..af0219b --- /dev/null +++ b/buch/chapters/40-eigenwerte/beispiele/n.m @@ -0,0 +1,55 @@ +# +# n.m -- Polynome mit dem gleichen Wert von p(A) +# +# (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule +# + +A0 = [ + 2, 1, 0; + 0, 2, 0; + 0, 0, 3 +]; + +# find a 3x3 matrix in SL(3,Z) + +function retval = zufallswert() + x = round(rand() * 10) - 2; + if (x >= 0) + x = x + 1; + endif + retval = x; +end + +function retval = zufallsmatrix(n) + retval = zeros(n, n); + for i = (1:n) + for j = (1:n) + retval(i,j) = zufallswert(); + end + end +end + +function retval = regulaer(n) + d = 0; + do + retval = zufallsmatrix(2); + d = det(retval); + until (d == 1); +end + +function retval = eingebettet(n,k) + retval = eye(n); + retval(k:k+1,k:k+1) = regulaer(2); +end + +format long + +B = eye(3); +B = B * eingebettet(3,2) +B = B * eingebettet(3,1) + +B +inverse(B) + +A = round(B * A0 * inverse(B)) + diff --git a/buch/chapters/40-eigenwerte/beispiele/n.maxima b/buch/chapters/40-eigenwerte/beispiele/n.maxima new file mode 100644 index 0000000..9ed83b6 --- /dev/null +++ b/buch/chapters/40-eigenwerte/beispiele/n.maxima @@ -0,0 +1,20 @@ +/* + * n.maxima + * + * (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule + */ +A: matrix( + [ 1, 9, -4 ], + [ -1, 3, 0 ], + [ -2, 0, 3 ] +); + +p: expand(charpoly(A,x)); +factor(p); + +A.A; +A.A.A; + +A.A - 5*A; + +A.A.A -7*A.A +16 *A; -- cgit v1.2.1