%% Solve Polynomial and Return Real Solutions
% Solve a fifth-degree polynomial. It has five solutions.

syms x
eqn = x^5 == 3125;
S = solve(eqn,x)

% Return only real solutions by setting 'Real' option to true. The only real solutions of this equation is 5.

S = solve(eqn,x,'Real',true)

%
% Copyright 2006-2019 The MathWorks, Inc.