help-octave
[Top][All Lists]

## Re: Symbolic Toolbox

 From: Ben Sapp Subject: Re: Symbolic Toolbox Date: Thu, 22 Jun 2000 08:35:44 -0600

```A Scottedward Hodel wrote:
>
> Hi Ben,
>
> I just read over your note in more detail.  There have been several requests
> for symbolic manipulation capabilities in Octave for some time.    I like
> your demo very much.  That it can be installed in a .oct file makes it
> that much better as an add-on package.

Thank you.

> How would you propose making the package available?

Well, I would like to do it the "best" way, whatever that may be. :)
Here is what I am currently thinking is best.  However, I am open to
suggestions.  I think that if I implement it correctly as .oct files
then it should not be very hard to add it into Octave as regular data
types and interenal functions.   I would like to do this because if we
do not I do not see how I could acomplish the following example with
trigonometric functions: (this example is made up and currently you can
not do this with my package.)

******************************************
octave:5> x = sym("x");
octave:6> a = x+sin(x^2);
octave:7> differentiate(a,x)
ans =

1+2*x*cos(x^2)
octave:8>
******************************************

But,  I do not see how I could do this with out modifying the current
Octave implementation of the internal sin function ... does any one
else?   Maybe I could change the name slightly like Sin and Cos instead
of sin and cos?  Is this a good idea?

I am also a bit unsure of how to implement matrices of symbolic
variables.  I could use the matrix class provided in the GiNaC library,
but I am a bit concerened that then we would have two types of matrix
implementations in Octave.  This seems sub optimal.  Is it possible to
use the templates in Octave on your own data types?   I suspect that the
answer is yes, but it is not clear to me how to do this.

Thanks.

--
Ben Sapp                         Los Alamos National Laboratory
Fax:   (505)665-7920             URL:   http://www.neutrino.lanl.gov/
--

-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.che.wisc.edu/octave/octave.html
How to fund new projects:  http://www.che.wisc.edu/octave/funding.html
Subscription information:  http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------

```