MATLAB: Solve Function – Having Difficulties

solve

I'm having trouble using the solve function and I don't understand the problem. I looked at other posts + documentation but I still don't see it.
>> x = solve('x+4==2',x)
Error using solve>getEqns (line 418)
List of equations must not be empty.
Error in solve (line 226)
[eqns,vars,options] = getEqns(varargin{:});
This is the input I entered and the error I'm receiving.

Best Answer

syms x
xsol = solve(str2sym('x+4==2'),x)