www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/EqualityOfTwoVectorsExample.m

    %% Equality of Two Vectors
% Create two vectors containing both real and imaginary numbers, then
% compare the vectors for equality.

% Copyright 2015 The MathWorks, Inc.

A = [1+i 3 2 4+i];
B = [1 3+i 2 4+i];
A == B
%%
% The |eq| function tests both real and imaginary parts for equality, and
% returns logical |1| (|true|) only where both parts are equal.