Skip to content

Commit

Permalink
updated&new ue.pdf, spicker started
Browse files Browse the repository at this point in the history
  • Loading branch information
joshinils committed Jul 1, 2019
1 parent 06036db commit cb60ccc
Show file tree
Hide file tree
Showing 14 changed files with 285 additions and 3 deletions.
Binary file modified texnotes/num2Notes.pdf
Binary file not shown.
4 changes: 1 addition & 3 deletions texnotes/num2Notes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@
\begin{document}
\pagestyle{fancy}

% \include{ue1}
% \include{ue2}
\include{ue3}
\input{spicker01}

\end{document}

Expand Down
Binary file added texnotes/num2Spicker.pdf
Binary file not shown.
193 changes: 193 additions & 0 deletions texnotes/num2Spicker.tex
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}














































20 changes: 20 additions & 0 deletions texnotes/spicker01.tex
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}

1 change: 1 addition & 0 deletions uebungen/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.asv
Binary file added uebungen/Num2_Probeaufgaben.pdf
Binary file not shown.
Binary file added uebungen/Num2_Projekt_1.pdf
Binary file not shown.
Binary file added uebungen/Num2_Projekt_2.pdf
Binary file not shown.
Binary file modified uebungen/Num2_uebung2.pdf
Binary file not shown.
Binary file added uebungen/Num2_uebung5_Loesungen.pdf
Binary file not shown.
5 changes: 5 additions & 0 deletions uebungen/factorio/funcApprox/logbApprox.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
limit_end = 3e5;
base = (limit_end)^(1/100); % of the log, meaning logb(limit_end) := 100
logb = @(x) log(x)/log(base);
%ableitung
logbA1 = @(x) 1 ./ (x .* log(base));
logbA2 = @(x) - 1 ./ (x .^ 2 .* log(base));
logbA3 = @(x) 2 ./ (x .^ 3 .* log(base));


n = 10; % amount of nodes

Expand Down
8 changes: 8 additions & 0 deletions uebungen/lagrangePolynom.m
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

57 changes: 57 additions & 0 deletions uebungen/ue5_3.m
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;


0 comments on commit cb60ccc

Please sign in to comment.