Back to Symbolic Mathematics
sym
Create symbolic variable or expression
Syntax
x = sym(s) x = sym(n)
Description
Creates a symbolic variable from a string name or converts a number to a symbolic number. Supports both function syntax sym('x') and command syntax sym x. When given a simple variable name, creates a symbolic variable. When given an expression string, parses it into a symbolic expression.
Parameters
| Name | Description |
|---|---|
| s | Variable name (string) or numeric value to convert |
Returns
Symbolic variable or expression