Find symbolic variables in symbolic expression, matrix, or function
Note: findsym is not recommended. Use symvar instead.
findsym(s) returns a string containing all symbolic variables in s in alphabetical order, separated by commas. If s does not contain any variables, findsym returns an empty string.
findsym(s) can return variables in a different order than findsym(s,n).
findsym does treat the constants pi, i, and j as variables.
If there are no symbolic variables in s, findsym returns the empty vector.
When sorting the symbolic variables by their proximity to x, findsym uses this algorithm:
The variables are sorted by the first letter in their names. The ordering is x y w z v u ... a X Y W Z V U ... A. The name of a symbolic variable cannot begin with a number.
For all subsequent letters, the ordering is alphabetical, with all uppercase letters having precedence over lowercase: 0 1 ... 9 A B ... Z a b ... z.