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

2 次查看(过去 30 天)
A = rand(M) * 5;
B = rand(k) * -8;
z = complex(A,B);

采纳的回答

Birdman
Birdman 2018-1-30
编辑:Birdman 2018-1-30
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)

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by