www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/TestComplexNumbersLessThanEqualExample.m
%% Test Complex Numbers %% % Create a vector of complex numbers. A = [1+i 2-2i 1+3i 1-2i 5-i]; %% % Find the values that are less than or equal to |3|. A(A <= 3) %% % |le| compares only the real part of the elements in |A|. %% % Use |abs| to find which elements are within a radius of |3| from the % origin. A(abs(A) <= 3) %% % The result has one less element. The element |1.0000 + 3.0000i| is not % within a radius of |3| from the origin.