Symbolic Math Toolbox – Matlab

Your scientific calculator now does definite integration, differentiation, etc. Maybe higher and more complex graphing calculators can do indefinite stuff too! However, I just found this very interesting ability to use a math symbol, typically x, so far known to exist only in Mathematica. This is the Symbolic Math Toolbox, and its uses are numerous.

Although I am sure it requires a lot of development, specially compatibility of integrating with other data types that Matlab supports, for starters, it seems like a really nice feature. The example where I used it is like this. Consider a simple 3×3 symmetric matrix, whose non-diagonal corners are equal, and unknown. You want to obtain a value for this, such that the determinant of the matrix goes to 0. Manually, yes, its easy. Its a simple quadratic equation, and it can be solved for. However, now consider a 20×20 matrix 🙂 Its terrible to compute its determinant, and then there is still an equation to solve. What symbolic math toolbox allows you to do is, define a variable – say z. In my case it would then be

syms z
Rxx = [1, 0.9, 0.8, ... z; ...; ...; z, ..., 0.8, 0.9, 1];

and you have the possible solutions for this variable z. Note the usage of the function solve() which is typically used to solve for variable given a polynomial equation.

It also does all the standard integration, differentiation, and even Taylor’s series expansion 🙂 and has a lot of applications. I want to now check it out for the basic transforms – Fourier, Laplace, Z, etc. Best to refer to the Matlab documentation on the toolbox for more information and examples on this. I am really loving this combination of the power of “indefinite” math along with powerful numeric functions.


2 thoughts on “Symbolic Math Toolbox – Matlab

  1. Armand Tamzarian

    Why not just use Mathematica? It matches Matlab in numerics (probably uses the same libraries actually) PLUS has symbolics.

    1. Makarand Tapaswi Post author

      Yes, but somehow engineers seem to be using Matlab more. Also I am not aware whether there are equivalents for the numerous toolboxes that are found in Matlab, and then there is Simulink 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s