aboutsummaryrefslogtreecommitdiffstats
path: root/buch/chapters/110-elliptisch/agm/agm.m
diff options
context:
space:
mode:
authorJODBaer <55744603+JODBaer@users.noreply.github.com>2022-07-18 13:54:57 +0200
committerGitHub <noreply@github.com>2022-07-18 13:54:57 +0200
commiteb8cc4b5029fd6fedfd5aaa133fd966a48b643db (patch)
tree313c7fce3526f271f07180839a5d8dfcf2d1b3a3 /buch/chapters/110-elliptisch/agm/agm.m
parentMerge branch 'AndreasFMueller:master' into master (diff)
parentMerge pull request #21 from enezerdem/master (diff)
downloadSeminarSpezielleFunktionen-eb8cc4b5029fd6fedfd5aaa133fd966a48b643db.tar.gz
SeminarSpezielleFunktionen-eb8cc4b5029fd6fedfd5aaa133fd966a48b643db.zip
Merge branch 'AndreasFMueller:master' into master
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)
+