File: ch08.html

package info (click to toggle)
genius 1.0.27-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 25,308 kB
  • sloc: ansic: 75,620; xml: 71,565; sh: 4,445; makefile: 1,927; lex: 523; yacc: 298; perl: 54
file content (45 lines) | stat: -rw-r--r-- 4,205 bytes parent folder | download
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
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 8. Matice v jazyce GEL</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"><link rel="home" href="index.html" title="Příručka k aplikaci Genius"><link rel="up" href="index.html" title="Příručka k aplikaci Genius"><link rel="prev" href="ch07s06.html" title="Načítání programů"><link rel="next" href="ch08s02.html" title="Operátor konjugované transpozice a transpozice"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 8. Matice v jazyce GEL</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch07s06.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch08s02.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="genius-gel-matrices"></a>Chapter 8. Matice v jazyce GEL</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="sect1"><a href="ch08.html#genius-gel-matrix-support">Zadávání matic</a></span></dt><dt><span class="sect1"><a href="ch08s02.html">Operátor konjugované transpozice a transpozice</a></span></dt><dt><span class="sect1"><a href="ch08s03.html">Lineární algebra</a></span></dt></dl></div><p>Genius podporuje vektory a matice a jeho součástí je rozsáhlá knihovna pro práci s maticemi a s funkcemi lineární algebry.</p><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="genius-gel-matrix-support"></a>Zadávání matic</h2></div></div></div><p lang="en">
To enter matrices, you can use one of the following two syntaxes. You can either enter
the matrix on one line, separating values by commas and rows by semicolons.  Or you
can enter each row on one line, separating
values by commas.
You can also just combine the two methods.
So to enter a 3x3 matrix
of numbers 1-9 you could do
</p><pre lang="en" class="programlisting">[1,2,3;4,5,6;7,8,9]
</pre><p lang="en">
or
</p><pre lang="en" class="programlisting">[1, 2, 3
 4, 5, 6
 7, 8, 9]
</pre><p lang="en">
Do not use both ';' and return at once on the same line though.
      </p><p lang="en">
You can also use the matrix expansion functionality to enter matrices.
For example you can do:
</p><pre lang="en" class="programlisting">a = [ 1, 2, 3
      4, 5, 6
      7, 8, 9]
b = [ a,  10
      11, 12]
</pre><p lang="en">
and you should get
</p><pre lang="en" class="programlisting">[1,   2,  3, 10
 4,   5,  6, 10
 7,   8,  9, 10
 11, 11, 11, 12]
</pre><p lang="en">
similarly you can build matrices out of vectors and other stuff like that.
      </p><p lang="en">
Another thing is that non-specified spots are initialized to 0, so
</p><pre lang="en" class="programlisting">[1, 2, 3
 4, 5
 6]
</pre><p lang="en">
will end up being
</p><pre lang="en" class="programlisting">
[1, 2, 3
 4, 5, 0
 6, 0, 0]
</pre><p lang="en">
      </p><p>Když jsou matice vyhodnocovány, jsou vyhodnocovány a procházeny po řádcích. Je to úplně stejné jako operátor <code class="literal">M@(j)</code>, který prochází matice po řádcích.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Věnujte pozornost při vracení z výrazů uvnitř závorek <code class="literal">[ ]</code>, protože tam mají lehce odlišný význam. Začnete tím nový řádek.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch07s06.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ch08s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Načítání programů </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Operátor konjugované transpozice a transpozice</td></tr></table></div></body></html>