Remove random columns from a big matrix?
Ältere Kommentare anzeigen
Hello,
I have this issue: I want to randomly remove 3000 columns from a big matrix with size 1600X8500. below I have a code I wrote but when I run it the matlab outputs the following error: Index exceeds the number of array elements (1650)
A=[x1 x2 ...] % 1600by8500 matrix
k=randperm(size(A,1));
B=A;
B(:,k(1:3000))=[];
Your help is important!!
Akzeptierte Antwort
Weitere Antworten (1)
madhan ravi
am 6 Aug. 2019
B(:,randperm(size(A,2),3000))=[]
1 Kommentar
stelios loizidis
am 6 Aug. 2019
Kategorien
Mehr zu Matrix Indexing 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!