With these it helps I'm guessing you typed help symvar into the MATLAB Command Window, which is normally the best first step, but in this case you may have come across a small pitfall. This is because symvar is an

overloaded function: there is more than one copy, and the copy that gets called depends on the data type/class of the variables/objects that are passed to it. You can see all the versions by using the

which function with the -all option. The output I get on R2018a is:

code :

```
>> which symvar -all
C:\Program Files\MATLAB\R2018a\toolbox\matlab\funfun\symvar.m
C:\Program Files\MATLAB\R2018a\toolbox\curvefit\curvefit\@fittype\symvar.m % fittype method
C:\Program Files\MATLAB\R2018a\toolbox\symbolic\symbolic\@sym\symvar.m % sym method
C:\Program Files\MATLAB\R2018a\toolbox\matlab\funfun\@inline\symvar.m % inline method
```

```
symvar Finds the symbolic variables in a symbolic expression or matrix.
symvar(S), where S is a scalar or matrix sym, returns a vector sym
containing all of the symbolic variables appearing in S. The
variables are returned in lexicographical order. If no symbolic variables
are found, symvar returns the empty vector.
The constants pi, i and j are not considered variables.
symvar(S,N) returns the N symbolic variables closest to 'x' or 'X'.
If N exceeds the number of variables appearing in S, or equals inf,
then all variables appearing in S are returned.
Upper-case variables are returned ahead of lower-case variables.
If S is a symbolic function the inputs to S are listed in front of the
other free variables.
Examples:
syms alpha a b x1 y
symvar(alpha+a+b) returns
[a, alpha, b]
symvar(cos(alpha)*b*x1 + 14*y,2) returns
[x1, y]
symvar(y*(4+3*i) + 6*j) returns
y
```