Practical 7

Toolbox Functions

sym(‘x’) or syms x Creates a symbolic variable
sym(1/4) Creates symbolic number 1/4
double(1/4) Converts symbolic number 1/4 to standard 0.25
subs(f,x,a) Substitutes a variable x in with value and finds

x=a

eval(f)

Finds value of at by assigning to first.
ezplot(f,a,b) Plots the symbolic function over the interval
pretty Formats output to look like type-set mathematics
simplify Performs algebraic and other function simplifications
simple Tries a number of simplification techniques including trigonometric identities. Running this command twice can further simplify complex expression.
collect Collects like terms
factor Attempts to factor the expression
expand Expands all terms
poly2sym Converts an array of polynomial coefficients into a symbolic expression with as the variable
sym2poly Converts symbolic polynomial into its coefficient array
diff(f,x) Finds 1st derivative of with respect to
diff(f,x,n) Finds nth derivative of with respect to
int(f,x) Indefinite integral of
int(f,x,a,b)

Definite integral of with endpoints ,