%% Calculate Several Real Roots of Scalar
% Create a vector of roots to calculate, N.

N = [5 3 -1];

%
% Use nthroot to calculate several real roots of -8.

Y = nthroot(-8,N)

% The result is a vector of the same size as N.
% Copyright 2012 The MathWorks, Inc.