aboutsummaryrefslogtreecommitdiffstats
path: root/buch/chapters/070-orthogonalitaet/images
diff options
context:
space:
mode:
authorAndreas Müller <andreas.mueller@ost.ch>2022-01-08 13:14:17 +0100
committerAndreas Müller <andreas.mueller@ost.ch>2022-01-08 13:14:17 +0100
commite6dfa9a04550a127df36bca3ae614ebca99401c0 (patch)
tree70b375ea0d0925a9d1e7537650043e5641933028 /buch/chapters/070-orthogonalitaet/images
parentreorganize chapter 7 (diff)
downloadSeminarSpezielleFunktionen-e6dfa9a04550a127df36bca3ae614ebca99401c0.tar.gz
SeminarSpezielleFunktionen-e6dfa9a04550a127df36bca3ae614ebca99401c0.zip
Pole und Nullstellen der Gewichtsfunktion
Diffstat (limited to 'buch/chapters/070-orthogonalitaet/images')
-rw-r--r--buch/chapters/070-orthogonalitaet/images/Makefile9
-rw-r--r--buch/chapters/070-orthogonalitaet/images/weight.m59
-rw-r--r--buch/chapters/070-orthogonalitaet/images/weight.pdfbin0 -> 22822 bytes
-rw-r--r--buch/chapters/070-orthogonalitaet/images/weight.tex174
4 files changed, 241 insertions, 1 deletions
diff --git a/buch/chapters/070-orthogonalitaet/images/Makefile b/buch/chapters/070-orthogonalitaet/images/Makefile
index e3a988a..900ae7f 100644
--- a/buch/chapters/070-orthogonalitaet/images/Makefile
+++ b/buch/chapters/070-orthogonalitaet/images/Makefile
@@ -4,11 +4,18 @@
#
# (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
#
-all: legendre.pdf orthogonal.pdf
+all: legendre.pdf orthogonal.pdf weight.pdf
legendrepaths.tex: legendre.m
octave legendre.m
legendre.pdf: legendre.tex legendrepaths.tex
pdflatex legendre.tex
+
orthogonal.pdf: orthogonal.tex legendrepaths.tex
pdflatex orthogonal.tex
+
+weight.pdf: weight.tex weightfunction.tex
+ pdflatex weight.tex
+weightfunction.tex: weight.m
+ octave weight.m
+
diff --git a/buch/chapters/070-orthogonalitaet/images/weight.m b/buch/chapters/070-orthogonalitaet/images/weight.m
new file mode 100644
index 0000000..62ea447
--- /dev/null
+++ b/buch/chapters/070-orthogonalitaet/images/weight.m
@@ -0,0 +1,59 @@
+#
+# weight.m
+#
+# (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+#
+global N;
+N = 200;
+global s;
+s = 8;
+global l;
+l = 10;
+global A;
+A = 0.3;
+
+function retval = gewicht(x)
+ global s;
+ retval = (x + 1)^(-2) * (x + 1/3)^(-0.9) * (x - 1/3) * (x - 1)^2 * exp(s * x);
+endfunction
+
+h = 2 / N;
+x = (-1:h:1);
+
+function punkt(fn, x, y)
+ global A;
+ fprintf(fn, "(%.4f,%.4f)", x, A * abs(y));
+endfunction
+
+fn = fopen("weightfunction.tex", "w");
+plotting = 0;
+drittelsuchen = 1;
+for i = (1:N+1)
+ if (drittelsuchen > 0)
+ if (x(i) > (1/3))
+ fprintf(fn, "\n\t-- ");
+ punkt(fn, 1/3, 0);
+ fprintf(fn, "% drittel");
+ drittelsuchen = 0
+ end
+ end
+ y = gewicht(x(i));
+ if (plotting > 0)
+ if (abs(y) > l)
+ fprintf(fn, ";\n");
+ plotting = 0;
+ end
+ fprintf(fn, "\t\n-- ");
+ punkt(fn, x(i), y);
+ else
+ if (abs(y) < l)
+ fprintf(fn, "\\draw[color=red,line width=2.0pt] ");
+ punkt(fn, x(i), y);
+ plotting = 1;
+ end
+ end
+endfor
+if (plotting > 0)
+ fprintf(fn, ";\n");
+end
+fclose(fn);
diff --git a/buch/chapters/070-orthogonalitaet/images/weight.pdf b/buch/chapters/070-orthogonalitaet/images/weight.pdf
new file mode 100644
index 0000000..164af55
--- /dev/null
+++ b/buch/chapters/070-orthogonalitaet/images/weight.pdf
Binary files differ
diff --git a/buch/chapters/070-orthogonalitaet/images/weight.tex b/buch/chapters/070-orthogonalitaet/images/weight.tex
new file mode 100644
index 0000000..796f09a
--- /dev/null
+++ b/buch/chapters/070-orthogonalitaet/images/weight.tex
@@ -0,0 +1,174 @@
+%
+% weight.tex -- Einfluss der Gewichtsfunktion auf die möglichen Funktionen
+%
+% (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+%
+\documentclass[tikz]{standalone}
+\usepackage{amsmath}
+\usepackage{times}
+\usepackage{txfonts}
+\usepackage{pgfplots}
+\usepackage{csvsimple}
+\usetikzlibrary{arrows,intersections,math}
+\begin{document}
+\def\skala{6}
+\begin{tikzpicture}[>=latex,thick,scale=\skala]
+
+\definecolor{hell}{rgb}{0.4,0.4,1}
+
+\xdef\sfour{0.16}
+\xdef\sthree{0.20}
+\xdef\stwo{0.27}
+\xdef\sone{0.45}
+
+\begin{scope}
+ \clip (-1,-1) rectangle (1,1);
+
+ \xdef\s{0.16}
+ \fill[color=blue!40]
+ plot[domain=0.7:0.99,samples=20]
+ ({\x},{\s*exp(-0.48*ln(1-\x))})
+ -- (1,1) -- (1,-1) --
+ plot[domain=0.99:0.7,samples=20]
+ ({\x},{-\s*exp(-0.48*ln(1-\x))})
+ -- cycle;
+
+ \xdef\s{0.20}
+ \fill[color=blue!40]
+ plot[domain=0.033:0.33,samples=20]
+ ({\x},{\s*exp(-0.28*ln(1/3-\x))})
+ -- ({1/3},1) --
+ plot[domain=0.34:0.6333,samples=20]
+ ({\x},{\s*exp(-0.28*ln(\x-1/3))})
+ --
+ plot[domain=0.6333:0.34,samples=20]
+ ({\x},{-\s*exp(-0.28*ln(\x-1/3))})
+ -- ({1/3},-1) --
+ plot[domain=0.333:0.033,samples=20]
+ ({\x},{-\s*exp(-0.28*ln(1/3-\x))})
+ -- cycle;
+
+ \xdef\s{0.27}
+ \fill[color=blue!40]
+ (-0.6333,-\s) rectangle (-0.0333,\s);
+
+ \xdef\s{0.45}
+ \fill[color=blue!40]
+ (-1,0)
+ --
+ plot[domain=-0.99:-0.7,samples=100]
+ ({\x},{\s*exp(0.48*ln(1+\x))})
+ --
+ plot[domain=-0.7:-0.99,samples=100]
+ ({\x},{-\s*exp(0.48*ln(1+\x))})
+ --
+ cycle;
+
+\end{scope}
+
+\def\rechteck#1#2{
+ \fill[color=hell!#1]
+ ({#2/300},1) rectangle ({(#2+1.1)/300},-1);
+}
+
+\def\verlauf{
+ \foreach\x in {0,1,...,100.1}{
+ \rechteck{\x}{\x}
+ \rechteck{\x}{-\x}
+ }
+}
+
+\def\rand{
+ plot[domain=0.7:0.99,samples=20]
+ ({\x},{\sfour*exp(-0.48*ln(1-\x))})
+ -- (1,1) -- (1,-1) --
+ plot[domain=0.99:0.7,samples=20]
+ ({\x},{-\sfour*exp(-0.48*ln(1-\x))})
+ --
+ plot[domain=0.6333:0.34,samples=20]
+ ({\x},{-\sthree*exp(-0.28*ln(\x-1/3))})
+ -- ({1/3},-1) --
+ plot[domain=0.333:0.033,samples=20]
+ ({\x},{-\sthree*exp(-0.28*ln(1/3-\x))})
+ --
+ (-0.0333,-\stwo) -- (-0.6333,-\stwo)
+ --
+ plot[domain=-0.7:-0.998,samples=100]
+ ({\x},{-\sone*exp(0.48*ln(1+\x))})
+ --
+ (-1,0)
+ --
+ plot[domain=-0.998:-0.7,samples=100]
+ ({\x},{\sone*exp(0.48*ln(1+\x))})
+ --
+ (-0.6333,\stwo) -- (-0.0333,\stwo)
+ --
+ plot[domain=0.033:0.33,samples=20]
+ ({\x},{\sthree*exp(-0.28*ln(1/3-\x))})
+ -- ({1/3},1) --
+ plot[domain=0.34:0.6333,samples=20]
+ ({\x},{\sthree*exp(-0.28*ln(\x-1/3))})
+ -- cycle;
+}
+
+\begin{scope}
+ \clip (-1,-1) rectangle (1,1);
+ \begin{scope}
+ \clip \rand;
+ \fill[left color=hell,right color=white]
+ (-1,-1) rectangle (-0.6666,1);
+ \fill[left color=white,right color=hell]
+ (-0.6666,-1) rectangle (-0.3333,1);
+ \fill[left color=hell,right color=white]
+ (-0.3333,-1) rectangle (0,1);
+ \fill[left color=white,right color=hell]
+ (0,-1) rectangle (0.3333,1);
+ \fill[left color=hell,right color=white]
+ (0.3333,-1) rectangle (0.6666,1);
+ \fill[left color=white,right color=hell]
+ (0.6666,-1) rectangle (1,1);
+ \end{scope}
+ \draw[color=white,line width=0.5pt] \rand;
+ \draw[color=white,line width=0.5pt] ({-2/3},-1) -- ({-2/3},1);
+ \draw[color=white,line width=0.5pt] ({2/3},-1) -- ({2/3},1);
+\end{scope}
+
+\draw[->] (-1.1,0) -- (1.1,0) coordinate[label={$x$}];
+\draw[->] (0,-1.1) -- (0,1.1) coordinate[label={right:$y$}];
+
+\begin{scope}
+ \clip (-1,-1) rectangle (1,1);
+
+ \input{weightfunction.tex}
+
+\end{scope}
+
+\draw[line width=0.2pt] (-1,-1) -- (-1,1);
+\draw[line width=0.2pt] ({-1/3},-1) -- ({-1/3},1);
+
+\draw ({-1/3},{-0.1/\skala}) -- ({-1/3},{0.1/\skala});
+\draw ({1/3},{-0.1/\skala}) -- ({1/3},{0.1/\skala});
+\draw (1,{-0.1/\skala}) -- (1,{0.1/\skala});
+
+\node at (-1,0) [below left] {$-1$};
+\node at (1,0) [below right] {$1$};
+
+\def\marke#1#2#3{
+ \fill[color=white,opacity=0.7]
+ ({#1-0.03},{#2-0.12})
+ rectangle
+ ({#1+0.03},{#2+0.12});
+}
+
+\marke{-1}{0.2}{}
+\node at (-1,0.2) [rotate=90] {$\alpha=-1.9$};
+\marke{-1/3}{0.2}{}
+\node at ({-1/3},0.2) [rotate=90] {$\alpha=-0.9$};
+\marke{1/3}{0.2}{}
+\node at ({1/3},0.2) [rotate=90] {$\alpha=1$};
+\marke{1}{0.2}{}
+\node at (1,0.2) [rotate=90] {$\alpha=2$};
+
+\end{tikzpicture}
+\end{document}
+