> Exercise: Evaluating Equations
Consider the function ![f(x)=\left(x^{3}+2\right) \sec x f(x)=\left(x^{3}+2\right) \sec x](https://lo.unisa.edu.au/filter/tex/pix.php/eca14f6bab1b4a98baac7db197992266.gif)
> Define this function in the Symbolic Toolbox, by first defining as a symbolic variable.
> Find by evaluating this function at using the subs command as follows:
y = subs(f,x,0.157)
> Find by evaluating this function at using the eval command as follows:
x = 0.123
y = eval(f)
As you can see the difference in these two examples is only in the number of commands you need to use to evaluate the function at a certain .
|