File: ch09.html

package info (click to toggle)
genius 1.0.27-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, 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 (33 lines) | stat: -rw-r--r-- 4,798 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
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 9. Polynomy 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="ch08s03.html" title="Lineární algebra"><link rel="next" href="ch10.html" title="Chapter 10. Teorie množin v jazyce GEL"></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 9. Polynomy v jazyce GEL</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch08s03.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch10.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="genius-gel-polynomials"></a>Chapter 9. Polynomy 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="ch09.html#genius-gel-polynomials-using">Používání polynomů</a></span></dt></dl></div><p>V současnosti Genius umí pracovat s polynomy jedné proměnné zapsanými jako vektory a umí s nimi některé základní operace. Do budoucna se počítá s rozšířením této funkcionality.</p><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="genius-gel-polynomials-using"></a>Používání polynomů</h2></div></div></div><p lang="en">
Currently
polynomials in one variable are just horizontal vectors with value only nodes.
The power of the term is the position in the vector, with the first position
being 0. So,
</p><pre lang="en" class="programlisting">[1,2,3]
</pre><p lang="en">
translates to a polynomial of
</p><pre lang="en" class="programlisting">1 + 2*x + 3*x^2
</pre><p lang="en">
      </p><p lang="en">
You can add, subtract and multiply polynomials using the
<a class="link" href="ch11s15.html#gel-function-AddPoly"><code class="function">AddPoly</code></a>,
<a class="link" href="ch11s15.html#gel-function-SubtractPoly"><code class="function">SubtractPoly</code></a>, and
<a class="link" href="ch11s15.html#gel-function-MultiplyPoly"><code class="function">MultiplyPoly</code></a> functions respectively.
You can print a polynomial using the
<a class="link" href="ch11s15.html#gel-function-PolyToString"><code class="function">PolyToString</code></a>
function.
For example,
</p><pre lang="en" class="programlisting">PolyToString([1,2,3],"y")
</pre><p lang="en">
gives
</p><pre lang="en" class="programlisting">3*y^2 + 2*y + 1
</pre><p lang="en">
You can also get a function representation of the polynomial so that you can
evaluate it. This is done by using
<a class="link" href="ch11s15.html#gel-function-PolyToFunction"><code class="function">PolyToFunction</code></a>,
which
returns an anonymous function.
</p><pre lang="en" class="programlisting">f = PolyToFunction([0,1,1])
f(2)
</pre><p lang="en">
      </p><p>Rovněž je možné hledat kořeny polynomů 1. až 4. stupně pomocí funkce <a class="link" href="ch11s13.html#gel-function-PolynomialRoots"><code class="function">PolynomialRoots</code></a>, která volá funkce s příslušnými vzorci. Vyšší stupně polynomů musí být převedeny na funkce a řešeny numericky pomocí funkcí, jako je <a class="link" href="ch11s13.html#gel-function-FindRootBisection"><code class="function">FindRootBisection</code></a>, <a class="link" href="ch11s13.html#gel-function-FindRootFalsePosition"><code class="function">FindRootFalsePosition</code></a>, <a class="link" href="ch11s13.html#gel-function-FindRootMullersMethod"><code class="function">FindRootMullersMethod</code></a> nebo <a class="link" href="ch11s13.html#gel-function-FindRootSecant"><code class="function">FindRootSecant</code></a>.</p><p>Ohledně ostatních funkcí týkajících se polynomů se podívejte se na <a class="xref" href="ch11s15.html" title="Polynomy">the section called “Polynomy”</a> v seznamu funkcí.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch08s03.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ch10.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Lineární algebra </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 10. Teorie množin v jazyce GEL</td></tr></table></div></body></html>