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

2 vues (au cours des 30 derniers jours)
VISHALI V
VISHALI V le 30 Jan 2018
Modifié(e) : James Tursa le 30 Jan 2018
A = rand(M) * 5;
B = rand(k) * -8;
z = complex(A,B);

Réponse acceptée

Birdman
Birdman le 30 Jan 2018
Modifié(e) : Birdman le 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)

Plus de réponses (0)

Catégories

En savoir plus sur Signal Processing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by