'r' stands for "rational." Floating-point numbers obtained by evaluating expressions of the form p/q, p*pi/q, sqrt(p), 2^q, and 10^q for modest sized integers p and q are converted to the corresponding symbolic form. This captures the floating-point values exactly, but may not be convenient for subsequent manipulation. 'f' stands for "floating-point." All values are represented in the form '1.F'*2^(e) or '-1.F'*2^(e) where F is a string of 13 hexadecimal digits and e is an integer. The technique for converting floating-point numbers is specified by the optional second argument, which can be 'f', 'r', 'e' or 'd'. S = sym(A,flag) converts a numeric scalar or matrix to symbolic form. The pi created in this way temporarily replaces the built-in numeric function with the same name. Statements like pi = sym('pi') and delta = sym('1/10') create symbolic numbers that avoid the floating-point approximations inherent in the values of pi and 1/10. x = sym('x','unreal') makes x a purely formal variable with no additional properties (i.e., ensures that x is not real). alpha = sym('alpha') and r = sym('Rho','real') are other examples. x = sym('x','real') also assumes that x is real, so that conj(x) is equal to x. x = sym('x') creates the symbolic variable with name 'x' and stores the result in x. If the input argument is a numeric scalar or matrix, the result is a symbolic representation of the given numeric values. If the input argument is a string, the result is a symbolic number or variable. S = sym(A,flag) where flag is one of 'r', 'd', 'e', or 'f'.ĭescription S = sym(A) constructs an object S, of class ' sym', from A. Sym (Symbolic Math Toolbox) Symbolic Math ToolboxĬonstruct symbolic numbers, variables and objects.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |