How can I create a new matrix from certain columns from another matrix?

51 views (last 30 days)
If I have a large matrix (60000,51) and I want the first three columns and the 37-42 columns in a new matrix how can I do that?

Accepted Answer

OCDER on 13 Oct 2017
NewMat = LargeMat(:, [1:3 37:42]);

More Answers (0)


Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by