Randomly select a column
Ältere Kommentare anzeigen
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 Kommentare
Torsten
am 4 Jun. 2022
Why do you ask the same question again ?
Here is (again) the answer:
x=n(:,sort(randperm(100,20)))
Md Nazmul Hoque
am 5 Jun. 2022
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!