-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
285 additions
and
3 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,193 @@ | ||
\documentclass[12pt]{article} | ||
|
||
\usepackage{amsmath,amssymb, a4, verbatim} | ||
\usepackage[german]{babel} | ||
%\usepackage[latin1]{inputenc} | ||
\usepackage[utf8]{inputenc} % üöäß | ||
\usepackage{listings} % für inline codelistings | ||
\lstset{% | ||
basicstyle=\ttfamily, % the size of the fonts | ||
columns=fixed, % anything else is horrifying | ||
showspaces=false, % show spaces using underscores? | ||
showstringspaces=false, % underline spaces within strings? | ||
showtabs=false, % show tabs within strings? | ||
xleftmargin=1.5em, % left margin space | ||
} | ||
\lstdefinestyle{inline}{basicstyle=\ttfamily} | ||
\newcommand{\listline}[1]{\lstinline[style=inline]!#1!} | ||
|
||
|
||
\usepackage{caption} | ||
\newcommand{\tinycaption}[1]{\captionsetup{labelformat=empty}\caption{#1}} | ||
|
||
%\usepackage{color} | ||
%\usepackage{epsfig} % eps | ||
\usepackage{graphicx} % eps | ||
%\usepackage[shortcuts]{extdash} | ||
%\usepackage{dsfont} | ||
%\usepackage{epstopdf} % eps | ||
%\usepackage[pdf]{pstricks} % eps | ||
%\usepackage{auto-pst-pdf} | ||
\usepackage{mathtools} | ||
\usepackage{dsfont} % $ \mathds{1} $ | ||
%\usepackage{icomma} | ||
\usepackage{tikz} | ||
%\usepackage{pgfplots} | ||
%\pgfplotsset{compat=1.8} | ||
\usepackage[bottom]{footmisc} % put footnotes at the bottom of page | ||
\usepackage{nicefrac} % für brüche die aussehen wie prozentzeichen | ||
% \usepackage{ps2pdf} | ||
\usetikzlibrary{automata,positioning} | ||
|
||
\usepackage{algorithmicx} | ||
\usepackage{algpseudocode} | ||
\usepackage{algorithm} | ||
|
||
\usepackage{multicol} | ||
\usepackage{wrapfig} % make stuff float | ||
\usepackage{placeins} % stop stuff from floating | ||
\usepackage{seqsplit} % very long numbers | ||
\usepackage{framed} % begin{framed} | ||
|
||
% Headings and Footings : | ||
%\usepackage{fancyhdr} | ||
%\headheight15pt | ||
%\lhead{Numerik II, \ueberschrift} | ||
|
||
%\chead{} | ||
%\rhead{\thepage} | ||
%\renewcommand{\headrulewidth}{.4pt} | ||
|
||
%\lfoot{\today} | ||
%\cfoot{} | ||
%\rfoot{Joshua} | ||
%\renewcommand{\footrulewidth}{.4pt} | ||
|
||
%---------------------------------------------------------------- | ||
|
||
%\textwidth16.5cm | ||
%\oddsidemargin0.cm | ||
%\evensidemargin0.cm | ||
|
||
\def\somedistanceLeft{10mm}%2cm} | ||
\def\somedistanceTop{10mm}%3cm} | ||
|
||
\usepackage{geometry} | ||
\geometry{ | ||
a4paper, % or A3, etc if to print smaller | ||
% total={170mm,257mm}, | ||
left=\somedistanceLeft, | ||
right=\somedistanceLeft, | ||
top=\somedistanceTop, | ||
bottom=\somedistanceTop, | ||
landscape % better i think | ||
} | ||
|
||
|
||
\parindent0cm | ||
|
||
\usepackage{cancel} | ||
|
||
\newcommand{\R}{ {\mathbb R} } | ||
\newcommand{\C}{ {\mathbb C} } | ||
\newcommand{\1}{ {\mathds{1}} } | ||
\newcommand{\abs}[1]{\lvert#1\rvert} | ||
\newcommand{\norm}[1]{\left\lVert#1\right\rVert} | ||
\newcommand{\xt}{\tilde{x}} | ||
\newcommand{\dotleq}{\dot{\leq}} | ||
\newcommand{\m}{\hphantom{-} } | ||
|
||
\newcommand{\dashfill}[1]{\vspace{11pt}\def\dashfill{\cleaders\hbox{#1}\hfill}\hbox to \hsize{\dashfill\hfil}\vspace{11pt}} | ||
\newcommand{\scdot}{\!\cdot\!} | ||
|
||
|
||
\newcommand{\sig}{\text{signum}} | ||
\newcommand{\rot}{} | ||
|
||
% ------------------ edit Ueberschrift --------------------- | ||
\newcommand{\ueberschrift}{Numerik II Notizen} | ||
|
||
|
||
\usepackage{mathpazo} | ||
\usepackage[mathpazo]{flexisym} | ||
\usepackage{breqn} | ||
|
||
% https://tex.stackexchange.com/questions/110393/too-wide-figure-caption | ||
% ffs \usepackage{boxhandler} | ||
|
||
\newcommand{\scalprod}[2]{\left\langle\,#1\,;\,#2\,\right\rangle} | ||
|
||
\usepackage{url} | ||
|
||
\usepackage{pdfpages} | ||
%\usepackage{showframe} | ||
% ----------------------------------------------------------- | ||
|
||
|
||
%\texttt{} num.num.alph as headings | ||
\renewcommand{\thesubsubsection}{\thesubsection.\alph{subsubsection}} | ||
|
||
\begin{document} | ||
\pagestyle{empty} % no line numbers | ||
|
||
% equation spacing | ||
\def\distEQ{12pt} | ||
\abovedisplayskip=\distEQ plus 0pt minus \distEQ | ||
\abovedisplayshortskip=0pt plus 0pt | ||
\belowdisplayskip=\distEQ plus 0pt minus \distEQ | ||
\belowdisplayshortskip=7pt plus 0pt minus 7pt | ||
|
||
% line between collumns | ||
\setlength{\columnsep}{5mm} | ||
\setlength{\columnseprule}{1pt} | ||
\begin{multicols}{2} | ||
\input{spicker01} | ||
\end{multicols} | ||
|
||
\end{document} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
\begin{minipage}[tc]{\linewidth} | ||
Lineares Ausgleichsproblem: | ||
\begin{tabular}{cl} | ||
\begin{tabular}{r|c|c|c|c} | ||
$t_i$ & 0 & 1 & 2 & 3 \\ | ||
\hline | ||
$y_i$ & 3 & $2,14$ & 1,8 & 1,72 \\ | ||
\end{tabular} & Daten \\ | ||
func & Modellfunktion \\ | ||
\end{tabular} | ||
\end{minipage} | ||
|
||
\begin{minipage}[tc]{\linewidth} | ||
Satz: 1.1: \linebreak[3] | ||
$x^*\in \R$ ist genau dann eine Lösung des linearen Ausgleichsproblems, | ||
wenn $x^*$ Lösung der Normalgleichung $A^TAx = A^Tb$ ist. | ||
Es gibt mindestens eine Lösung $x^*$. | ||
Sie ist eindeutig, gdw. $Rang(A) = n$. | ||
\end{minipage} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.asv |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
function [ y ] = lagrangePolynom( j, knoten, x ) | ||
y = ones(size(x)); | ||
for i = 1:length(knoten) | ||
if j == i ; continue; end; | ||
y = y .* (x-knoten(i)) ./ (knoten(j)-knoten(i)); | ||
end | ||
end % function | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
format compact; | ||
format shortg; | ||
clear all; | ||
close all; | ||
|
||
n = 6; | ||
nPoints = n*100; | ||
more = 0.02*0; | ||
x = linspace(-1-more,1+more,nPoints); | ||
|
||
funToInterp = @(t) sin(t*pi); | ||
|
||
|
||
%% lagrange | ||
subplot(2,1,1); | ||
hold on; | ||
|
||
xiEqual = -1 +2* (0:n) ./ n | ||
|
||
plot(xiEqual, 1, 'o', 'HandleVisibility','off'); | ||
allY = zeros(size(x)); | ||
for j=(0:n)+1 | ||
y = lagrangePolynom(j, xiEqual, x); | ||
allY = allY + y*funToInterp(xiEqual(j)); | ||
plot(x,y, 'HandleVisibility','off'); | ||
axis tight; | ||
end | ||
plot(x, allY, '-g.', 'DisplayName', 'Approximation'); | ||
err = abs(funToInterp(x)-allY); | ||
max(err) | ||
plot(x, err, '-r.', 'DisplayName', 'Error'); | ||
plot(x, funToInterp(x), '-b', 'DisplayName', 'funToInterp'); | ||
legend show; | ||
|
||
%% tschebyschow | ||
subplot(2,1,2); | ||
hold on; | ||
|
||
xiTsche = -cos((2*(0:n)+1) / (2*n + 2) * pi); | ||
|
||
plot(xiTsche, 1, 'o', 'HandleVisibility','off'); | ||
allY = zeros(size(x)); | ||
for j=(0:n)+1 | ||
y = lagrangePolynom(j, xiTsche, x); | ||
allY = allY + y*funToInterp(xiTsche(j)); | ||
plot(x,y, 'HandleVisibility','off'); | ||
axis tight; | ||
end | ||
plot(x, allY, '-g.', 'DisplayName', 'Approximation'); | ||
err = abs(funToInterp(x)-allY); | ||
max(err) | ||
plot(x, err, '-r.', 'DisplayName', 'Error'); | ||
plot(x, funToInterp(x), '-b', 'DisplayName', 'funToInterp'); | ||
|
||
legend show; | ||
|
||
|