-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConsoleApp_Matrix.html
More file actions
404 lines (391 loc) · 13.1 KB
/
ConsoleApp_Matrix.html
File metadata and controls
404 lines (391 loc) · 13.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<style></style>
<h1 id="consoleapp_matrix">ConsoleApp_Matrix</h1>
<p>Console applications for matrix <em>calculation</em> and <em>tools</em> (German), c.f. Meyberg & Vachenauer (2001), Karpfinger (2022) or Gentle (2024).</p>
<h2 id="ama">AMA</h2>
<p>Addiert oder subtrahiert 2 Matrizen</p>
<p>$$k_1=k_2\text { und } n_1=n_2$$</p>
<p>wird vorausgesetzt.</p>
<ul>
<li>Übernahme 2er ASCII Matrixdateien.</li>
<li>Ausgabe einer ASCII Matrixdatei.</li>
</ul>
<p>Handhabung</p>
<pre><code>AMA [matrix1] [matrix2] [output] [mode]
[matrix1] ... Eingabe Datei 1
[matrix2] ... Eingabe Datei 2
[output] ... Ausgabe Datei
[mode] ...... (0):Addition (1):Subtraktion
</code></pre>
<h2 id="ima">IMA</h2>
<p>Berechnet die inverse $\mathbfit A ^{-1}$ von $\mathbfit A$ über die verkettete Form
des Gaussschen Algorithmus</p>
<p>$$k_{max}=n_{max}= 200,a_{11}\ne0.$$</p>
<p>Es resultieren 2 Dreiecksmatrizen $\mathbfit B$ und $\mathbfit C$, sowie die Matrix $\mathbfit T$
zur erzeugten Einheitsmatrix $\mathbfit E$, $\mathbfit A^{-1}$ entsteht transponiert:</p>
<pre><code>. . . A 1 0 0 E
. . . 0 1 0
. . . 0 0 1
. . . B . . . T
. . . . .
. . . .
. C
. .
. . . (1/A)'
. . .
. . .
</code></pre>
<ul>
<li>Übernahme einer quadratischen ASCII Matrixdatei.</li>
<li>Ausgabe einer quadratischen ASCII Matrixdatei.</li>
</ul>
<p>Handhabung</p>
<pre><code>IMA [matrix] [output]
[matrix] ... Eingabe Datei
[output] ... Ausgabe Datei
</code></pre>
<h2 id="mma">MMA</h2>
<p>Multipliziert 2 Matrizen ($k_1=n_2$ wird vorausgesetzt).
Es resultiert eine Matrix mit</p>
<p>$$n=n_1,\text{ }k=k_2:$$</p>
<pre><code> * =
o . . o o o o
o . . . . o .
. .
o . . o o o o
o . . . . o .
o . . . . o .
o . . o .
o . . o .
o . . o o o o o o o o o o
o . . . . . . . o . . . .
. . . . .
</code></pre>
<ul>
<li>Übernahme 2er ASCII Matrixdateien.</li>
<li>Ausgabe einer ASCII Matrixdatei.</li>
</ul>
<p>Handhabung</p>
<pre><code>MMA [matrix1] [matrix2] [output]
[matrix1] ... Eingabe Datei 1
[matrix2] ... Eingabe Datei 2
[output] ... Ausgabe Datei
</code></pre>
<h2 id="qma">QMA</h2>
<p>Quadriert eine quadratische Matrix:</p>
<pre><code> * =
o . o o o o
o . . . o .
</code></pre>
<ul>
<li>Übernahme einer quadratischen ASCII Matrixdateien.</li>
<li>Ausgabe einer quadratischen ASCII Matrixdatei.</li>
</ul>
<p>Handhabung</p>
<pre><code>QMA [matrix] [matrix] [output]
[matrix] ... Eingabe Datei
[output] ... Ausgabe Datei
</code></pre>
<h2 id="sma">SMA</h2>
<p>Selegiert eine Sub Matrix (oder einen Vektor) aus einer Matrix.</p>
<ul>
<li>Übernahme einer ASCII Matrixdatei.</li>
<li>Ausgabe einer ASCII (Matrix-)Datei.</li>
</ul>
<p>Handhabung</p>
<pre><code>SMA [matrix] [output] [i0] [i1] [j0] [j1]
[matrix] ................. Matrix Datei
[output] ................. Matrix Ausgabe Datei
[i0] ..................... von Zeile
[i1] ..................... bis Zeile
[j0] ..................... von Spalte
[j1] ..................... bis Spalte
</code></pre>
<h2 id="spur">SPUR</h2>
<p>Berechnet die Spur (<em>sp</em>) einer quadratischen Matrix $\mathbfit A$:</p>
<pre><code> o . . A
. o .
. . o
sp A
</code></pre>
<ul>
<li>Übernahme einer quadratischen ASCII Matrixdatei.</li>
<li>Ausgabe von <em>sp</em> $\mathbfit A$ in die Datei <code>SPUR.txt</code>.</li>
</ul>
<p>Handhabung</p>
<pre><code>SPUR [matrix] [mode]
[matrix] ... Eingabe Datei
[mode] ..... Art der Spurberechnung:
(0): Addition der Diagonalelemente (Standard)
(1): Multiplikation der Diagonalelemente (siehe Determinante, VMA.exe)
(2): Subtraktion der Diagonalelemente
(3): Division der Diagonalelemente
</code></pre>
<h2 id="trp">TRP</h2>
<p>Transponiert eine Datenmatrix</p>
<p>$$n_{max}= k_{max}= 1299.$$</p>
<p>Spaltentrennzeichen, Eingabedatei: Tabulator oder Leerzeichen.
Spaltentrennzeichen, Ausgabedatei: 1 Leerzeichen.</p>
<ul>
<li>Übernahme einer ASCII Datenmatrixdatei.</li>
<li>Ausgabe einer transponierten ASCII Datenmatrixdatei.</li>
</ul>
<p>Handhabung</p>
<pre><code>TRP [input] [output]
[inpup] .... Eingabe Datei
[output] ... Ausgabe Datei
</code></pre>
<h2 id="vma">VMA</h2>
<p>Berechnet die verkettete Form des Gaussschen Algorithmus
einer quadratischen Matrix $\mathbfit A$, mit</p>
<p>$$k_{max}=n_{max}= 250,a_{11}\ne0.$$</p>
<p>Es resultieren 2 Dreiecksmatrizen $\mathbfit B$ und $\mathbfit C$:</p>
<pre><code> . . . A
. . .
. . .
. . . B
. .
.
. C
. .
</code></pre>
<p>Die Determinante von $\mathbfit A$ (det $\mathbfit A)$ ist das Produkt der Elemente in der Hauptdiagonale von $\mathbfit B$ ($\mathbfit{TT} b_{ii}$).</p>
<ul>
<li>Übernahme einer quadratischen ASCII Matrixdatei.</li>
<li>Ausgabe einer quadratischen ASCII Matrixdatei.</li>
</ul>
<p>Handhabung</p>
<pre><code>VMA [matrix] [output]
[matrix] ... Eingabe Datei
[output] ... Ausgabe Datei
</code></pre>
<h2 id="zma">ZMA</h2>
<p>Multipliziert eine Matrix mit einer reellen Zahl.</p>
<ul>
<li>Übernahme einer ASCII Matrixdatei.</li>
<li>Ausgabe einer ASCII Matrixdatei.</li>
</ul>
<p>Handhabung</p>
<pre><code>ZMA [matrix] [output] [wert}
[matrix] ... Eingabe Datei
[output] ... Ausgabe Datei
[wert] ..... Reelle Zahl
</code></pre>
<h2 id="ent">ENT</h2>
<p>Führt eine symmetrische entwobene Aufteilung einer Datenvektordatei $\mathbfit x_0$ durch:</p>
<pre><code> x0
--
1
2
3
4
x1 x2
-- --
1
2
3
4
</code></pre>
<ul>
<li>Übernahme einer einspaltigen ASCII Datei.</li>
<li>Ausgabe von 2 einspaltigen ASCII Dateien.</li>
</ul>
<p>Handhabung</p>
<pre><code>ENT [input] [output1] [output2]
[input] ..... Eingabe Datei
[output1] ... Ausgabe Datei 1
[output2] ... Ausgabe Datei 2
</code></pre>
<h2 id="ktf">KTF</h2>
<p>Verringert oder vergrössert den Umfang eines perfekt linearen Datenvektors. Die bis $n'$ iterative Datenanpassung erfolgt über</p>
<p>$$x_i[n]= x_i[n+1]⋅\frac{n}{n-1}; n'\lt n,$$
$$x_i[n]= x_i[n-1]⋅\frac{n-2}{n-1} ; n'\gt n.$$</p>
<ul>
<li>Übernahme einer einspaltigen, aufsteigend geordneten ASCII Datenvektordatei im Umfang $n$.</li>
<li>Ausgabe einer einspaltigen, aufsteigend geordneten ASCII Datenvektordatei im Umfang $n'$.</li>
</ul>
<p>Handhabung</p>
<pre><code>ktf [input] [output] [n]
[input] ... Eingabe Datei
[output] .. Ausgabe Datei
[n] ....... Vektorumfang n'
</code></pre>
<h2 id="ktf2">KTF2</h2>
<p>Verringert oder vergrössert den Umfang eines Datenvektors ($n_{max}= n'_{max}= 33000$).</p>
<ul>
<li>Übernahme einer einspaltigen, aufsteigend geordneten ASCII Datenvektordatei im Umfang $n$.</li>
<li>Ausgabe einer einspaltigen, aufsteigend geordneten ASCII Datenvektordatei im Umfang $n'$.</li>
</ul>
<p>Handhabung</p>
<pre><code>ktf2 [input] [output] [n]
[input] ... Eingabe Datei
[output] .. Ausgabe Datei
[n] ....... Vektorumfang n'
</code></pre>
<h2 id="ktf3">KTF3</h2>
<p>Passt einen Datenvektor an ein Ziel-Koordinatensystem an.
Die Datenanpassung erfolgt über</p>
<p>$$x_i'=min_x+\biggl{\{}</p>
<p>bei einer Wertinvertierung errechnet man $x''_i$ über</p>
<p>$$x''_i = (min_x+max_x) - x'_i,$$
mit</p>
<p>$min_x$ ... Wert des Minimalpunktes im Ziel-Koordinatensystem<br />
$max_x$ .... Wert des Maximalpunktes im Ziel-Koordinatensystem<br />
$x_{min}$ .. Vektor Minimalwert<br />
$x_{max}$ .. Vektor Maximalwert</p>
<ul>
<li>Übernahme einer einspaltigen, aufsteigend geordneten ASCII Datenvektordatei.</li>
<li>Ausgabe einer zweispaltigen, aufsteigend geordneten ASCII Datenmatrixdatei beinhaltend:</li>
</ul>
<pre><code>Den an das Ziel-Koordinatensystem angepassten Datenvektor.
Den ursprünglichen Datenvektor.
</code></pre>
<p>Handhabung</p>
<pre><code>ktf3 [input] [output] [minx] [maxx] [inv]
[input] ... Eingabe Datei
[output] .. Ausgabe Datei
[minx] .... Wert des Minimalpunktes im Ziel-Koordinatensystem
[maxx] .... Wert des Maximalpunktes im Ziel-Koordinatensystem
[inv] ..... 1: Wertinvertierung 0: Keine Wertinvertierung
</code></pre>
<h2 id="ntf">NTF</h2>
<p>Erzeugt einen aufsteigend geordneten linearen Datenvektor und passt diesen an ein Ziel-Koordinatensystem an.
Die Datenanpassung erfolgt über</p>
<p>$$x_i'=min_x+\biggl{\{}</p>
<p>bei einer Wertinvertierung errechnet man $x_i''$ über</p>
<p>$$x''_i = (min_x+max_x) - x'_i,$$
mit</p>
<p>$min_x$ .... Wert des Minimalpunktes im Ziel-Koordinatensystem<br />
$max_x$ .... Wert des Maximalpunktes im Ziel-Koordinatensystem<br />
$x_{min}$ .. Vektor Minimalwert<br />
$x_{max}$ .. Vektor Maximalwert</p>
<ul>
<li>Ausgabe einer einspaltigen, aufsteigend geordneten linearen ASCII Datenvektordatei.</li>
</ul>
<p>Handhabung</p>
<pre><code>ntf [output] [minn] [maxn] [min] [max] [inv]
[output] ........................... Ausgabe Datei
[minn] ............................. n Minimalwert
[minn] ............................. n Maximalwert
[min] ........... Koordinaten Minimalpositionswert
[max] ........... Koordinaten Maximalpositionswert
[inv] ............ 1:invertiert 0:nicht invertiert
</code></pre>
<h2 id="sel">SEL</h2>
<p>Selegiert einen Datenvektor aus einer Datenmatrix</p>
<p>$$n_{max}= 33000.$$</p>
<ul>
<li>Übernahme einer ASCII Datenmatrixdatei.</li>
<li>Ausgabe einer einspaltigen ASCII Datenvektordatei.</li>
</ul>
<p>Handhabung</p>
<pre><code>sel [input] [output] [a] [k]
[input] ... Eingabe Datei
[output] .. Ausgabe Datei
[a] ....... Vektornummer
[k] ....... Vektoranzahl
</code></pre>
<h2 id="srt">SRT</h2>
<p>Sortiert einen Datenvektor</p>
<p>$$n_{max}= 33000,$$</p>
<p>16 stellige Ausgabe.</p>
<ul>
<li>Übernahme einer einspaltigen ASCII Datenvektordatei.</li>
<li>Ausgabe einer sortierten einspaltigen ASCII Datenvektordatei.</li>
</ul>
<p>Handhabung</p>
<pre><code>srt [input] [output] [[d]]
[input] ... Eingabe Datei
[output] .. Ausgabe Datei
[d] ....... optional 1: absteigende Sortierung
</code></pre>
<h2 id="srt1">SRT1</h2>
<p>Verkettet 2 sortierte Datenvektoren mit
Filestream Verarbeitung, $n_{max} \rightarrow \infty$.</p>
<ul>
<li>Übernahme von zwei aufsteigend sortierten einspaltigen ASCII Datenvektordateien.</li>
<li>Ausgabe einer sortierten einspaltigen ASCII Datenvektordatei.</li>
</ul>
<p>Handhabung</p>
<pre><code>srt1 [input1] [input2] [output]
[input1] ... Eingabe Datei 1
[input2] ... Eingabe Datei 2
[output] ... Ausgabe Datei
</code></pre>
<h2 id="srt2">SRT2</h2>
<p>Sortiert einen Datenvektor</p>
<p>$$n_{max}= 33000.$$</p>
<p>Die Datensortierung erfolgt über iterativen Paarvergleich</p>
<p>$$i \text{ vs. } i+1$$</p>
<p>und Paartausch</p>
<p>$$i > i+1.$$</p>
<p>(langsamer als <code>SRT.EXE</code>)</p>
<ul>
<li>Übernahme einer einspaltigen ASCII Datenvektordatei.</li>
<li>Ausgabe einer sortierten einspaltigen ASCII Datenvektordatei.</li>
</ul>
<p>Handhabung</p>
<pre><code>srt2 [input] [output] [[d]]
[input] ... Eingabe Datei
[output] .. Ausgabe Datei
[d] ....... optional 1: absteigende Sortierung
</code></pre>
<h2 id="srt3">SRT3</h2>
<p>Sortiert einen Datenvektor</p>
<p>$$n_{max}= 33000,$$</p>
<p>max. 8-Stellen.</p>
<p>Sehr schnelle Berechnung durch Umsetzung der C-eigenen <code>Qsort</code> Funktion.</p>
<ul>
<li>Übernahme einer einspaltigen ASCII Datenvektordatei.</li>
<li>Ausgabe einer sortierten einspaltigen ASCII Datenvektordatei.</li>
</ul>
<p>Handhabung</p>
<pre><code>srt3 [input] [output] [[d]]
[input] ... Eingabe Datei
[output] .. Ausgabe Datei
[d] ....... optional 1: absteigende Sortierung
</code></pre>
<h2 id="v2v">V2V</h2>
<p>Fügt 2 einspaltige ASCII Dateien aneinander ($n_1=n_2$ wird vorausgesetzt).</p>
<ul>
<li>Übernahme von 2 einspaltigen ASCII Dateien.</li>
<li>Ausgabe einer zweispaltigen ASCII Datei.</li>
</ul>
<p>Handhabung</p>
<pre><code>V2V [input1] [input2] [output] [tab]
[input1] ... Eingabe Datei 1
[input2] ... Eingabe Datei 2
[output] ... Ausgabe Datei
[tab] ...... Spalten Trennzeichen (0):Tabulator (1):Leerzeichen (*):ein beliebiger String
</code></pre>
<h2 id="z2z">Z2Z</h2>
<p>Fügt zwei ASCII Dateien aneinander.</p>
<ul>
<li>Übernahme zweier ASCII Dateien.</li>
<li>Ausgabe einer ASCII Datei.</li>
</ul>
<p>Handhabung</p>
<pre><code>Z2Z [input1] [input2] [output]
[input1] ... Eingabe Datei 1
[input2] ... Eingabe Datei 2
[output] ... Ausgabe Datei
</code></pre>
<h2 id="references">References</h2>
<p>Gentle, J. E. (2024). <em>Matrix Algebra: Theory, Computations and Applications in Statistics</em>. Springer Texts in Statistics. Springer. <a href="https://doi.org/10.1007/978-3-031-42144-0">https://doi.org/10.1007/978-3-031-42144-0</a>.</p>
<p>Karpfinger, C. (2022). Calculating with Matrices. In <em>Calculus and Linear Algebra in Recipes: Terms, Phrases and Numerous Examples in Short Learning Units</em>, 87–100. Berlin, Heidelberg: Springer Berlin Heidelberg. <a href="https://doi.org/10.1007/978-3-662-65458-3_10">https://doi.org/10.1007/978-3-662-65458-3_10</a>.</p>
<p>Meyberg, K., & Vachenauer, P. (2001). <em>Höhere Mathematik 1</em>. Springer-Lehrbuch. Springer, Berlin, Heidelberg. <a href="https://doi.org/10.1007/978-3-642-56654-7">https://doi.org/10.1007/978-3-642-56654-7</a>.</p>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['\\[','\\]'], ['\\(','\\)']]}
});
</script>
</body>
</html>