Matlab Fundamentals: Symbolic Math

The Symbolic Math package, included in the Student Edition of Matlab, allows us to easily do symbolic manipulations on equations, such as factoring, solving, root finding, integrating, differentiating and solving differential equations.
  1. For all variables in the Symbolic Math Package, use single lower case letters (a,b,c,...z) and not upper case letters, numbers or multicharacter strings. The package sometimes has problems parsing strings with more complicated variable names.
  2. To define a mathematical function, put quotes around it, such as: 'a*x^2 + b*x + c=0' or 'p*v = n*r*t'
  3. You can store a function in a character string, such as QuadEqn = 'a*x^2 + b*x + c=0'
  4. The solve command will find the solution (either symbolic or numeric) for a single equation or a system of equations. Try some of the examples below:
  5. To quickly plot some equation with a single variable over some range, use ezplot
  6. For a complete discussion, see the "Symbolic Math Toolbox Tutorial" in the Student Edition of Matlab manual.



Electronic Copy: http://physics.gac.edu/~huber/matlab/mtlabsym.htm
Revised: 28-JAN-97 by Tom Huber, Physics Department, Gustavus Adolphus College.