Randomly select a column

10 vues (au cours des 30 derniers jours)
Md Nazmul Hoque
Md Nazmul Hoque le 4 Juin 2022
Commenté : Md Nazmul Hoque le 5 Juin 2022
n= 3*100 matrix
i want to select 20 non repeating random column
so, final matrix will be
x=3*20 ;
where 3 rows should be the corresponding column value of the original matrix
Any help would be really appreciated.
Thanks
  2 commentaires
Torsten
Torsten le 4 Juin 2022
Md Nazmul Hoque
Md Nazmul Hoque le 5 Juin 2022
sorry for that bro, i'm kinda new.
i wanted the specific solution.
in the last one , i thought i couldn't explain it properly
thats why. anyway thank you for your support.

Connectez-vous pour commenter.

Réponse acceptée

Matt J
Matt J le 4 Juin 2022
Modifié(e) : Matt J le 4 Juin 2022
x=n(:,randperm(100,20))
  1 commentaire
Md Nazmul Hoque
Md Nazmul Hoque le 5 Juin 2022
Thank you Bro.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by