www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/ComplexOneExample.m
%% Complex One % Create a scalar |1| that is not real valued, but instead is complex like % an existing array. %% % Define a complex vector. p = [1+2i 3i]; %% % Create a scalar |1| that is complex like |p|. X = ones('like',p)