The solve() accessible directly from MATLAB cannot do that. Use the MuPAD solve()
feval(symengine, 'solve', sin(x) + cos(2*x) == 1, sym('x = -2*pi .. 2*pi'))
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!