aboutsummaryrefslogtreecommitdiffstats
path: root/buch/chapters/110-elliptisch/agm/agm.m
diff options
context:
space:
mode:
authorNicolas Tobler <nicolas.tobler@ost.ch>2022-08-03 20:37:12 +0200
committerNicolas Tobler <nicolas.tobler@ost.ch>2022-08-03 20:37:12 +0200
commite08392d4bacb9a54c3ab755fa6445514749b608f (patch)
tree67af5a4a6ed541b1b425de89fd05c2a74a265571 /buch/chapters/110-elliptisch/agm/agm.m
parentimproved Einleitung (diff)
parentMerge pull request #39 from NaoPross/master (diff)
downloadSeminarSpezielleFunktionen-e08392d4bacb9a54c3ab755fa6445514749b608f.tar.gz
SeminarSpezielleFunktionen-e08392d4bacb9a54c3ab755fa6445514749b608f.zip
Merge branch 'master' of https://github.com/AndreasFMueller/SeminarSpezielleFunktionen
Diffstat (limited to 'buch/chapters/110-elliptisch/agm/agm.m')
-rw-r--r--buch/chapters/110-elliptisch/agm/agm.m20
1 files changed, 20 insertions, 0 deletions
diff --git a/buch/chapters/110-elliptisch/agm/agm.m b/buch/chapters/110-elliptisch/agm/agm.m
new file mode 100644
index 0000000..dcb3ad8
--- /dev/null
+++ b/buch/chapters/110-elliptisch/agm/agm.m
@@ -0,0 +1,20 @@
+#
+# agm.m
+#
+# (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+#
+format long
+
+n = 10;
+a = 1;
+b = sqrt(0.5);
+
+for i = (1:n)
+ printf("%20.16f %20.16f\n", a, b);
+ A = (a+b)/2;
+ b = sqrt(a*b);
+ a = A;
+end
+
+K = pi / (2 * a)
+