aboutsummaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorAdrian Kummerlaender2017-02-15 22:14:23 +0100
committerAdrian Kummerlaender2017-02-15 22:14:23 +0100
commit499e86e0ef9a88a3ad96b8e842c42ea9fb6ba73f (patch)
tree2f5df32705ea7599fb826fcfc8798094a64e79bc /content
parent4afe91337a6acecb79be07646e986a8eeb67a9ca (diff)
downloadmath_reference_sheets-499e86e0ef9a88a3ad96b8e842c42ea9fb6ba73f.tar
math_reference_sheets-499e86e0ef9a88a3ad96b8e842c42ea9fb6ba73f.tar.gz
math_reference_sheets-499e86e0ef9a88a3ad96b8e842c42ea9fb6ba73f.tar.bz2
math_reference_sheets-499e86e0ef9a88a3ad96b8e842c42ea9fb6ba73f.tar.lz
math_reference_sheets-499e86e0ef9a88a3ad96b8e842c42ea9fb6ba73f.tar.xz
math_reference_sheets-499e86e0ef9a88a3ad96b8e842c42ea9fb6ba73f.tar.zst
math_reference_sheets-499e86e0ef9a88a3ad96b8e842c42ea9fb6ba73f.zip
Add some Matlab indexing basics
Diffstat (limited to 'content')
-rw-r--r--content/numerik_1.tex14
1 files changed, 14 insertions, 0 deletions
diff --git a/content/numerik_1.tex b/content/numerik_1.tex
index e132dde..98bae5b 100644
--- a/content/numerik_1.tex
+++ b/content/numerik_1.tex
@@ -565,3 +565,17 @@ $$s_j''(t) = M_j \frac{t_{j+1}-t}{h_{j+1}} + M_{j+1} \frac{t-t_j}{h_{j+1}}$$
Hierbei ist $h_{j+1} := t_{j+1} - t_j$ die Länge des Teilintervalls $[t_j,t_{j+1}]$.
Zweimalige Intergration liefert an dieser Stelle $s_j$, die Integrationskonstanten lassen sich aus den Interpolationsbedingungen berechnen.
+
+\section*{Some Matlab Basics}
+
+\begin{lstlisting}[frame=single,language=Matlab]
+A = [ 1 0 ; 0 1 ] % = eye(2)
+b = [ 3 4 ]' % = [ 3; 4 ]
+b(1) = 4 % => b = [ 4 4 ]'
+A(2,1) = 2 % => A = [ 1 0 ; 2 1 ]
+c = 1:3 % = [ 1 2 3 ]
+c = 1:2:6 % = [ 1 3 5 ]
+A(2,:) % = [ 3 1 ]
+A(:,1) % = [ 1 ; 3 ]
+A.^2 % = [ 1 0 ; 9 1 ]
+\end{lstlisting}