Symbolic Computation in Matlab 5

Note that there were major changes in this area from Matlab 4.

Note that much of this is implemented through a number of Maple calls and so the syntax does vary from what you would expect elsewhere in Matlab.

Many of the symbolic arguments are passed in as strings, and so surrounded by apostrophes.

Just typing in a sumbolic reference will result in an error e.g.

>> y=x^2
??? Undefined function or variable 'x'.
One way around this is to use single quotes:
>> y='x^2'

y =

x^2
from which one can then do things like
> diff (y,'x')
 
ans =
 
2*x

Creating a Symbolic Matrix

A=sym('[x1,x2,x3; x4,x5,x6; x7,x8,x9]')

Note that the commas above are not what you would use for a numeric matrix in Matlab.

Sending commands to the Maple kernel

maple(' maple command ')

Arbitrary Precision Calculation

vpa(pi,100) to calculate pi to 100 decimal places.

Last Update: September 25, 2000

[Mathlab Home | Math]