Mercurial > forge
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 <a href="http://www.ginac.de">GiNaC</a> . 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: sym_matrix = [x+1, x+5; x^2+4,x^2+2*x+1]; I could make a function like sym_matrix(the_rows,the_columns,x+1, ... ) 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. For example: vpa("1")/vpa("7") is represented internally as exactly 1/7. However, vpa("1")/7 or 1/vpa("7") 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. I handle some of them at this time, but I do not handle all of them. This can cause octave to terminate prematurely. For example, try vpa("1")/vpa("0"). 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. You may be able to get by with an earlier version of octave if you compiled without the "-fno-rtti -fno-exceptions" options. This package uses both exceptions and run-time type identification. 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 . 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. If the function is </font><font color="#CC0000">red </font><font color="#000000">then it has not been implemented yet. 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. Blues will appear only very rarely.</font> <ul> <li> <font color="#009900">vpa</font> - create a variable precision arithmetic variable from a string, double, or an appropriate expression.</li> <li> <font color="#009900">sym</font> - create a symbolic variable</li> <li> <font color="#009900">is_vpa</font> - returns true if an object is a vpa object</li> <li> <font color="#009900">is_sym</font> - return true if the argument is a symbolic variable</li> <li> <font color="#009900">is_ex</font> - returns true if an object a symbolic expression (i.e. x+y)</li> <li> <font color="#009900">to_double</font> - convert a vpa, ex or string to a double value.</li> <li> <font color="#009900">to_char</font> - convert a vpa, ex to a string.</li> <li> <font color="#009900">digits</font> - set or view the number of digits that newly created vpa object should have</li> <li> <font color="#CC0000">Abs</font> - Absolute value</li> <li> <font color="#CC0000">csgn</font> -</li> <li> <font color="#CC0000">Sqrt</font> - Sqrt(x) => x^(vpa(1)/2) or x^(1/vpa(2))</li> <li> <font color="#009900">Cos</font> - 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> - the inverse cosine of a sym, vpa , or ex variable</li> <li> <font color="#009900">aSin</font> - the inverse sin of a sym, vpa , or ex variable</li> <li> <font color="#009900">aTan</font> - the inverse tangent of a sym, vpa , or ex variable</li> <li> <font color="#CC0000">aTan2</font> -</li> <li> <font color="#009900">Cosh</font> - the hyperbolic cosine of a sym, vpa , or ex variable</li> <li> <font color="#009900">Sinh</font> - the hyperbolic sine of a sym, vpa , or ex variable</li> <li> <font color="#009900">Tanh</font> - 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> - the inverse hyperbolic tangent of a sym, vpa , or ex variable</li> <li> <font color="#009900">Exp</font> - the cosine of a sym, vpa , or ex variable</li> <li> <font color="#009900">Log</font> - the cosine of a sym, vpa , or ex variable</li> <li> <font color="#CC0000">Zeta</font> -</li> <li> <font color="#CC0000">Tgamma</font> -</li> <li> <font color="#CC0000">Lgamma</font> -</li> <li> <font color="#CC0000">Beta</font> -</li> <li> <font color="#CC0000">Factorial</font> -</li> <li> <font color="#CC0000">Binomial</font> -</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> - differentiate an expression</li> <li> <font color="#009900">expand</font> - multiply all of the terms in an expression out: (x+y)*(x+z) => x^2+x*y+x*z+y*z</li> <li> <font color="#009900">collect</font> - collect similar terms in an already expanded expression</li> <li> <font color="#009900">coeff</font> - return the nth coefficient in a polynomial</li> <li> <font color="#009900">lcoeff</font> - leading coefficient of a polynomial (4x^2+2x+5 => 4)</li> <li> <font color="#009900">tcoeff</font> - trailing coefficient of a polynomial (4x^2+2x+5 => 5)</li> <li> <font color="#009900">degree</font> - The degree of a polynomial (i.e. x^2+2x+1 => 2)</li> <li> <font color="#009900">ldegree</font> - The low degree of a polynomial (i.e. x^2+2x+1 => 0)</li> <li> <font color="#009900">quotient</font> -</li> <li> <font color="#009900">remainder</font> -</li> <li> <font color="#009900">premainder</font> -</li> <li> <font color="#CC0000">unit</font> -</li> <li> <font color="#CC0000">content</font> -</li> <li> <font color="#CC0000">primpart</font> -</li> <li> <font color="#CC0000">Gcd</font> - greatest common denominator of a polynomial expression</li> <li> <font color="#CC0000">Lcm</font> - least common multiple of a polynomial expression</li> <li> <font color="#CC0000">numer</font> -</li> <li> <font color="#CC0000">denom</font> -</li> <li> normal - ?</li> <li> <font color="#CC0000">to_rational</font> -</li> <li> <font color="#CC0000">Series</font> -</li> <li> <font color="#009900">Pi</font> - pi evaluated to the current value of digits accuracy.</li> <li> <font color="#009900">splot</font> -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>