view main/symbolic/doc/symbolic.html @ 11613:e4cb1c2c39c4 octave-forge

Fix for functions of >2 variables, reported by Hershal.
author i7tiol
date Mon, 08 Apr 2013 11:52:52 +0000
parents 9585f93393ab
children
line wrap: on
line source

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="GENERATOR" content="Mozilla/4.75C-SGI [en] (X11; U; IRIX 6.5 IP22) [Netscape]">
</head>
<body text="#000000" bgcolor="#FFFFFF" link="#0000FF" vlink="#FF0000" alink="#000088">
<font size=+2>Octave Symbolic Manipulation Toolbox</font>
<p>The Octave Symbolic Manipulation Toolbox is based upon&nbsp; <a href="http://www.ginac.de">GiNaC</a>
.&nbsp;&nbsp; The goal is to simply provide the capabilities of GiNaC in
the easy to use environment provided by Octave.
<p><font size=+1>Limitations/Features</font>
<br>Currently there is no support for symbolic matrices. I think it would
require a few changes to the parser to do it nicely: for example:&nbsp;
sym_matrix = [x+1, x+5; x^2+4,x^2+2*x+1];&nbsp; I could make a function
like sym_matrix(the_rows,the_columns,x+1, ... )&nbsp; that returned a symbolic
matrix but this would be a bit of a kludge.
<p>In order to do exact arithmetic you need to deal with strings and the
vpa command.&nbsp; For example:&nbsp; vpa("1")/vpa("7") is represented
internally as exactly 1/7.&nbsp;&nbsp; However,&nbsp; vpa("1")/7 or 1/vpa("7")&nbsp;
is an approximation to 1/7 that is accurate to roughly the accuracy of
the current value of digits.
<p>GiNaC throws exceptions when there are problems with computations.&nbsp;&nbsp;
I handle some of them at this time, but I do not handle all of them.&nbsp;&nbsp;
This can cause octave to terminate prematurely.&nbsp;&nbsp; For example,
try vpa("1")/vpa("0").&nbsp;&nbsp; This will eventually be fixed.
<p><font size=+1>Download and install</font>
<p>You will need to install cln-1.0.1, GiNaC-0.8.0 and octave-2.1.33 or
later to use this package.&nbsp; You may be able to get by with an earlier
version of octave if you compiled without the "-fno-rtti -fno-exceptions"
options.&nbsp;&nbsp; This package uses both exceptions and run-time type
identification.&nbsp;&nbsp;&nbsp; There is an INSTALL file in the package
which will tell you how to install the package.
<p><font size=+1>Functions</font>
<br>Below I provide a list of function that I have implemented or have
plans to implement as of the latest release .&nbsp; If the function name
is <font color="#009900">green</font><font color="#330000"> </font><font color="#000000">then
the function is implemented and to the best of my knowledge there are no
problems with it.&nbsp; If the function is </font><font color="#CC0000">red
</font><font color="#000000">then it has not been implemented yet.&nbsp;
If the function is </font><font color="#000099">blue</font><font color="#000000">
then it has been implemented but is known not to work correctly.&nbsp;
Blues will appear only very rarely.</font>
<ul>
<li>
<font color="#009900">vpa</font>&nbsp; - create a variable precision arithmetic
variable from a string, double, or an appropriate expression.</li>

<li>
<font color="#009900">sym</font>&nbsp; - create a symbolic variable</li>

<li>
<font color="#009900">is_vpa</font>&nbsp; - returns true if an object is
a vpa object</li>

<li>
<font color="#009900">is_sym</font>&nbsp; - return true if the argument
is a symbolic variable</li>

<li>
<font color="#009900">is_ex</font>&nbsp; - returns true if an object a
symbolic expression (i.e.&nbsp; x+y)</li>

<li>
<font color="#009900">to_double</font>&nbsp; - convert a vpa, ex or string
to a double value.</li>

<li>
<font color="#009900">to_char</font>&nbsp; - convert a vpa, ex to a string.</li>

<li>
<font color="#009900">digits</font>&nbsp; - set or view the number of digits
that newly created vpa object should have</li>

<li>
<font color="#CC0000">Abs</font>&nbsp; - Absolute value</li>

<li>
<font color="#CC0000">csgn</font>&nbsp; -</li>

<li>
<font color="#CC0000">Sqrt</font>&nbsp; - Sqrt(x)&nbsp; => x^(vpa(1)/2)
or x^(1/vpa(2))</li>

<li>
<font color="#009900">Cos</font>&nbsp; - the cosine of a sym, vpa , or
ex variable</li>

<li>
<font color="#009900">Sin</font> - the sine of a sym, vpa , or ex variable</li>

<li>
<font color="#009900">Tan</font> - the tangent of a sym, vpa , or ex variable</li>

<li>
<font color="#009900">aCos</font>&nbsp; - the inverse cosine of a sym,
vpa , or ex variable</li>

<li>
<font color="#009900">aSin</font>&nbsp; - the inverse sin of a sym, vpa
, or ex variable</li>

<li>
<font color="#009900">aTan</font>&nbsp; - the inverse tangent of a sym,
vpa , or ex variable</li>

<li>
<font color="#CC0000">aTan2</font>&nbsp; -</li>

<li>
<font color="#009900">Cosh</font>&nbsp; - the hyperbolic cosine of a sym,
vpa , or ex variable</li>

<li>
<font color="#009900">Sinh</font>&nbsp; - the hyperbolic sine of a sym,
vpa , or ex variable</li>

<li>
<font color="#009900">Tanh</font>&nbsp; - the hyperbolic tangent of a sym,
vpa , or ex variable</li>

<li>
<font color="#009900">aCosh</font> - the inverse hyperbolic cosine of a
sym, vpa , or ex variable</li>

<li>
<font color="#009900">aSinh</font> - the inverse hyperbolic sine of a sym,
vpa , or ex variable</li>

<li>
<font color="#009900">aTanh</font>&nbsp; - the inverse hyperbolic tangent
of a sym, vpa , or ex variable</li>

<li>
<font color="#009900">Exp</font>&nbsp; - the cosine of a sym, vpa , or
ex variable</li>

<li>
<font color="#009900">Log</font>&nbsp; - the cosine of a sym, vpa , or
ex variable</li>

<li>
<font color="#CC0000">Zeta</font>&nbsp; -</li>

<li>
<font color="#CC0000">Tgamma</font>&nbsp; -</li>

<li>
<font color="#CC0000">Lgamma</font>&nbsp; -</li>

<li>
<font color="#CC0000">Beta</font>&nbsp; -</li>

<li>
<font color="#CC0000">Factorial</font>&nbsp; -</li>

<li>
<font color="#CC0000">Binomial</font>&nbsp; -</li>

<li>
<font color="#CC0000">Order</font> -</li>

<li>
<font color="#009900">subs</font> - perform a substitution in an expression</li>

<li>
<font color="#009900">differentiate</font>&nbsp; - differentiate an expression</li>

<li>
<font color="#009900">expand</font>&nbsp; -&nbsp; multiply all of the terms
in an expression out:&nbsp; (x+y)*(x+z) => x^2+x*y+x*z+y*z</li>

<li>
<font color="#009900">collect</font>&nbsp; - collect similar terms in an
already expanded expression</li>

<li>
<font color="#009900">coeff</font>&nbsp; - return the nth coefficient in
a polynomial</li>

<li>
<font color="#009900">lcoeff</font>&nbsp; - leading coefficient of a polynomial
(4x^2+2x+5 => 4)</li>

<li>
<font color="#009900">tcoeff</font>&nbsp; - trailing coefficient of a polynomial
(4x^2+2x+5 => 5)</li>

<li>
<font color="#009900">degree</font>&nbsp; - The degree of a polynomial
(i.e. x^2+2x+1 => 2)</li>

<li>
<font color="#009900">ldegree</font>&nbsp; - The low degree of a polynomial
(i.e. x^2+2x+1&nbsp; => 0)</li>

<li>
<font color="#009900">quotient</font>&nbsp; -</li>

<li>
<font color="#009900">remainder</font>&nbsp; -</li>

<li>
<font color="#009900">premainder</font>&nbsp; -</li>

<li>
<font color="#CC0000">unit</font>&nbsp; -</li>

<li>
<font color="#CC0000">content</font>&nbsp; -</li>

<li>
<font color="#CC0000">primpart</font>&nbsp; -</li>

<li>
<font color="#CC0000">Gcd</font>&nbsp; - greatest common denominator of
a polynomial expression</li>

<li>
<font color="#CC0000">Lcm</font>&nbsp; - least common multiple of a polynomial
expression</li>

<li>
<font color="#CC0000">numer</font>&nbsp; -</li>

<li>
<font color="#CC0000">denom</font>&nbsp; -</li>

<li>
normal&nbsp; - ?</li>

<li>
<font color="#CC0000">to_rational</font>&nbsp; -</li>

<li>
<font color="#CC0000">Series</font>&nbsp; -</li>

<li>
<font color="#009900">Pi</font>&nbsp; - pi evaluated to the current value
of digits accuracy.</li>

<li>
<font color="#009900">splot</font>&nbsp; -plot a symbolic functin over
a range of values</li>

<li>
<font color="#CC0000">Saving of expressions, Retrieving of expressions</font></li>
</ul>

</body>
</html>