Symbolic Intro
Symbolic Intro
Symbolic Objects
• The Symbolic Math Toolbox defines a new MATLAB
data type called a symbolic object.
• Or type
syms a b c x which is the same as
a = sym('a')
b = sym('b')
c = sym('c')
x = sym('x')
GETTING STARTED
• syms a b n t x z
• f = x^n; g = sin(a*t + b);
• findsym(f)
• ans =
• n, x
• findsym(g)
• ans =
• a, b, t
THE SUBS COMMAND
• Syms x
• f = 2*x^2 - 3*x + 1
• enter the command
• subs(f,2)
• This returns f(2):
• ans =
• 3