Randomly select a column

10 Ansichten (letzte 30 Tage)
Md Nazmul Hoque
Md Nazmul Hoque am 4 Jun. 2022
Kommentiert: Md Nazmul Hoque am 5 Jun. 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 Kommentare
Md Nazmul Hoque
Md Nazmul Hoque am 5 Jun. 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.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Matt J
Matt J am 4 Jun. 2022
Bearbeitet: Matt J am 4 Jun. 2022
x=n(:,randperm(100,20))

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by