www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/FindRootsofNumberExample.m
%% Find Roots of Number %% % Calculate the roots of |-1| to the |1/3| power. A = -1; B = 1/3; C = A.^B %% % For negative base |A| and noninteger |B|, if |abs(B)| is less than |1|, % the |power| function returns the complex roots of |A|. %% % Use the |nthroot| function to obtain the real roots. C = nthroot(A,3)