extracting the nth multiple rows of a large matrix to create a submatrix
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi. Please i have a large matrix a=(1290 x 2) and i want to extract rows in multiple of 5 to create a new matrix. For example, a new matrix x, should be made of, the 5th row,10th row,15th row and so on, of matrix a. Please help me, I am new to MATLAB. Thanks
0 Kommentare
Antworten (2)
madhan ravi
am 5 Dez. 2018
Bearbeitet: madhan ravi
am 5 Dez. 2018
Simpler and easier:
x = a(5:5:end,:) % edited after all the comments
4 Kommentare
Image Analyst
am 5 Dez. 2018
And (should be obvious, but evidently she's a beginner), to create the x she asked for:
x = a(5:5:end,:)
Kevin Chng
am 5 Dez. 2018
try, let say a is your matrix(1290x2)
a(1:5:1290,:)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!