ATLAB Lecture 5 School of Mathematical Sciences Xiamen University http∥gdjpkc.xmu.edu.cr To determine what symbolic variables are present in an expression, use the findsym >>ffxn: gg=sin(a*t+btc): %given the symbolic expressions f and g > findsym(ff) %find the symbolic variables in ff > findsym(gg) %find the symbolic variables in gg b t 2 * Creating Abstract function >>f=sym(f(x)) % create an abstract (i. e, indeterminate)function Then f acts like and can be manipulated by the toolbox command df=(subs(f, x', x+h")-fh %to construct the first difference x h > df=(subs(f,x, x+h)-f/h df This application of sym is useful when computing Fourier, Laplace, and Z-transformsMATLAB Lecture 5 School of Mathematical Sciences Xiamen University http://gdjpkc.xmu.edu.cn Lec59 To determine what symbolic variables are present in an expression, use the findsym command. >> syms a b n t x z >> c=1 >> ff= x^n; gg = sin(a*t + b+c); %given the symbolic expressions f and g >> findsym(ff) %find the symbolic variables in ff ans = n, x >> findsym(gg) %find the symbolic variables in gg ans = a, b, t ² *Creating Abstract Functions >> f = sym('f(x)') % create an abstract (i.e., indeterminate) function Then f acts like and can be manipulated by the toolbox commands. >> df = (subs(f,'x','x+h') f)/'h' %to construct the first difference ratio or >> syms x h >> df = (subs(f,x,x+h)f)/h df = (f(x+h)f(x))/h This application of sym is useful when computing Fourier, Laplace, and ztransforms