| 1 | <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"> |
| 2 | Currently |
| 3 | polynomials in one variable are just horizontal vectors with value only nodes. |
| 4 | The power of the term is the position in the vector, with the first position |
| 5 | being 0. So, |
| 6 | </p><pre lang="en" class="programlisting">[1,2,3] |
| 7 | </pre><p lang="en"> |
| 8 | translates to a polynomial of |
| 9 | </p><pre lang="en" class="programlisting">1 + 2*x + 3*x^2 |
| 10 | </pre><p lang="en"> |
| 11 | </p><p lang="en"> |
| 12 | You can add, subtract and multiply polynomials using the |
| 13 | <a class="link" href="ch11s15.html#gel-function-AddPoly"><code class="function">AddPoly</code></a>, |
| 14 | <a class="link" href="ch11s15.html#gel-function-SubtractPoly"><code class="function">SubtractPoly</code></a>, and |
| 15 | <a class="link" href="ch11s15.html#gel-function-MultiplyPoly"><code class="function">MultiplyPoly</code></a> functions respectively. |
| 16 | You can print a polynomial using the |
| 17 | <a class="link" href="ch11s15.html#gel-function-PolyToString"><code class="function">PolyToString</code></a> |
| 18 | function. |
| 19 | For example, |
| 20 | </p><pre lang="en" class="programlisting">PolyToString([1,2,3],"y") |
| 21 | </pre><p lang="en"> |
| 22 | gives |
| 23 | </p><pre lang="en" class="programlisting">3*y^2 + 2*y + 1 |
| 24 | </pre><p lang="en"> |
| 25 | You can also get a function representation of the polynomial so that you can |
| 26 | evaluate it. This is done by using |
| 27 | <a class="link" href="ch11s15.html#gel-function-PolyToFunction"><code class="function">PolyToFunction</code></a>, |
| 28 | which |
| 29 | returns an anonymous function. |
| 30 | </p><pre lang="en" class="programlisting">f = PolyToFunction([0,1,1]) |
| 31 | f(2) |
| 32 | </pre><p lang="en"> |
| 33 | </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> |