![]() The pretty() function tries to display a symbolic expression in a prettier way. H = compose(f,g) % functional composition: f(g(X)) f =įunctions of multiple variables can also be created. Note that these too are symbolic expressions, not function handles. We can build up more complicated symbolic expressions by defining functions of these variables. To convert a constant symbolic expression to a regular Matlab double value, use the double() function. Q = sym(22/14 + 18/402) % add two fractions exactly r = W = r*2-3/t % notice that r is not evaluated T = sym(2/3) % Need to use sym here, not syms ![]() syms A B lambda X Y Z aĬonstant symbols can be defined too, which are not evaluated numerically. Symbolic variables are treated differently than regular variables in Matlab and must be created using the sym() or syms() functions. Online Documentation Working with Symbolic Variables For more information, see the online documentation. There is more to this package than we can describe here.
0 Comments
Leave a Reply. |