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

    %% Complex Vector  
% Create a complex vector from two 4-by-1 vectors of real numbers. |z| is a
% 4-by-1 complex vector.

x = [1:4]';
y = [8:-2:2]';

z = x+1i*y