Creating a new matrix from an existing matrix
73 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Claire
am 21 Jan. 2015
Kommentiert: Claire
am 21 Jan. 2015
My original matrix is a 4x6 matrix. However, I need to extract part of this matrix to make a new 3x4 matrix. For this new matrix, I only need the first, second, and fourth row and the first, second, fourth, and sixth columns from the original matrix. How would I go about creating this new matrix? Thank you!
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 21 Jan. 2015
Bearbeitet: Image Analyst
am 21 Jan. 2015
m2 = m([1,2,4],:); % Extract rows 1, 2, and 4;
m2 = m2(:, [1, 2, 4, 6]); Now extract columns 1,2,4,& 6
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Interpolation 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!