help-octave
[Top][All Lists]

## Re: Examples for use of symbolic toolbox?

 From: Geordie McBain Subject: Re: Examples for use of symbolic toolbox? Date: Thu, 27 Oct 2005 11:42:12 +1000

```I'm not a regular user of the symbolic toolbox (I normally use the more
specialized packages Maxima or Emacs Calc for symbolic stuff that's too
much for pencil and paper), but I can give you some simple examples of
the functions you mentioned:

octave> symbols
octave> X = sym ("x");
octave> differentiate (Sin (X), X)
ans =

cos(x)
octave> expand ((X+1)*(X+2))
ans =

2.0+x^2+(3.0)*x
octave> collect ((X+1)*(X+2), X)
ans =

2.0+x^2+(3.0)*x
octave>

Note:
1) call symbols first
2) declare symbols with sym
3) capitalize functions like Sin

Hope that's enough to get you started.

Geordie McBain
www.aeromech.usyd.edu.au/~mcbain

On Wed, 2005-10-26 at 14:12 +0200, Michael Kopp wrote:
> Hello,
>
> can anyone provide me with some simple examples for the use of the symbolic
> toolbox from octave-forge (differentiate, expand, collect etc.)? Are there
> some resources on the web? I am not sure about the syntax, and what I have
> tried so far either produces meaningless results or seg-faults.
>
> TIA,
>
> Michael.
>
>
>
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
>
> Octave's home on the web:  http://www.octave.org
> How to fund new projects:  http://www.octave.org/funding.html
> Subscription information:  http://www.octave.org/archive.html
> -------------------------------------------------------------
>

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

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

```