Create symbolic functions - MATLAB symfun
www.mathworks.com › help › symbolicCreate two symbolic functions. syms f (x) g (x) f (x) = 2*x^2 - x; g (x) = 3*x^2 + 2*x; Combine the two symbolic functions into another symbolic function h ( x) with the data type symfun. h (x) = [f (x); g (x)] h (x) =. ( 2 x 2 - x 3 x 2 + 2 x) Evaluate the function h ( x) at x = 1 and x = 2. h (1) ans =.
Symbolic Math in Matlab
userpages.umbc.edu › Symbolic_Math_MatlabPlotting Symbolic Function In Matlab, we can plot a symbolic function over one variable by using the ezplot function. Here is an example: >> y = sin(x) y = sin(x) >> ezplot(y) If you want to see something cool, try: >> f = sin(x); >> ezsurf(f); Now try: >> f = sin(x); >> g = cos(y); >> ezsurf(f+g); Or really cool!
Matlab - Symbolic Math
www.cs.utah.edu › Topics › MatlabThe key function in Matlab to create a symbolic representation of data is: sym () or syms if you have multiple symbols to make. Below is an example of creating some symbolic fractions and square roots: >> sqrt(2) ans =. 1.4142. >> sqrt( sym(2) ) ans =. 2^ (1/2) >> 2 / 5.