aboutsummaryrefslogtreecommitdiffstats
path: root/buch/chapters/060-integral/images/legendre.m
diff options
context:
space:
mode:
authorAndreas Müller <andreas.mueller@ost.ch>2022-01-07 20:31:27 +0100
committerAndreas Müller <andreas.mueller@ost.ch>2022-01-07 20:31:27 +0100
commit5c05517960c4913a10eb526b69f99178ee08ef68 (patch)
tree951fc4e1d787ae7389c9061a3b9fae45aee6d373 /buch/chapters/060-integral/images/legendre.m
parenttypo (diff)
downloadSeminarSpezielleFunktionen-5c05517960c4913a10eb526b69f99178ee08ef68.tar.gz
SeminarSpezielleFunktionen-5c05517960c4913a10eb526b69f99178ee08ef68.zip
reorganize chapter 7
Diffstat (limited to 'buch/chapters/060-integral/images/legendre.m')
-rw-r--r--buch/chapters/060-integral/images/legendre.m64
1 files changed, 0 insertions, 64 deletions
diff --git a/buch/chapters/060-integral/images/legendre.m b/buch/chapters/060-integral/images/legendre.m
deleted file mode 100644
index 8e8317d..0000000
--- a/buch/chapters/060-integral/images/legendre.m
+++ /dev/null
@@ -1,64 +0,0 @@
-#
-# legendre.m
-#
-# (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
-#
-pkg load miscellaneous
-global N;
-N = 30;
-
-function retval = legendrepath(fn, n, name)
- global N;
- m = n * N;
- c = legendrepoly(n)
- x = (-m:m)/m;
- v = polyval(c, x);
- fprintf(fn, "\\def\\legendre%s{\n", name)
- fprintf(fn, "\t ({%.5f*\\dx},{%.5f*\\dy})", x(1), v(1));
- for i = (2:length(v))
- fprintf(fn, "\n\t-- ({%.5f*\\dx},{%.5f*\\dy})", x(i), v(i));
-
- endfor
- fprintf(fn, "\n}\n");
- ci = polyint(conv(c, c))
-polyval(ci, 1)
- normalization = sqrt(polyval(ci, 1) - polyval(ci, -1))
- fprintf(fn, "\\def\\normalization%s{%.5f}\n", name, normalization);
-endfunction
-
-function retval = legendreprodukt(fn, a, b, name)
- global N;
- n = max(a, b);
- m = n * N;
- pa = legendrepoly(a);
- pb = legendrepoly(b);
- p = conv(pa, pb);
- x = (-m:m)/m;
- v = polyval(p, x);
- fprintf(fn, "\\def\\produkt%s{\n", name)
- fprintf(fn, "\t ({%.5f*\\dx},{%.5f*\\dy})", x(1), v(1));
- for i = (2:length(v))
- fprintf(fn, "\n\t-- ({%.5f*\\dx},{%.5f*\\dy})", x(i), v(i));
- endfor
- fprintf(fn, "\n}\n");
-endfunction
-
-fn = fopen("legendrepaths.tex", "w");
-legendrepath(fn, 1, "one");
-legendrepath(fn, 2, "two");
-legendrepath(fn, 3, "three");
-legendrepath(fn, 4, "four");
-legendrepath(fn, 5, "five");
-legendrepath(fn, 6, "six");
-legendrepath(fn, 7, "seven");
-legendrepath(fn, 8, "eight");
-legendrepath(fn, 9, "nine");
-legendrepath(fn, 10, "ten");
-
-legendreprodukt(fn, 4, 7, "ortho");
-legendreprodukt(fn, 4, 4, "vier");
-legendreprodukt(fn, 7, 7, "sieben");
-
-fclose(fn);
-
-