how to generate a complex matrix of different rows and column?

3 views (last 30 days)
A = rand(M) * 5;
B = rand(k) * -8;
z = complex(A,B);

Accepted Answer

Birdman
Birdman on 30 Jan 2018
Edited: Birdman on 30 Jan 2018
One approach:
a=5*rand(15,1);
b=-8*rand(15,1);
%creation
Comp=repmat(complex(a,b),1,3);
%%shuffle
Comp(:,2)=Comp(randperm(size(Comp,1)),2)
Comp(:,3)=Comp(randperm(size(Comp,1)),3)

More Answers (0)

Categories

Find more on Wireless Communications in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!