Extract some columns from a matrix

19 Ansichten (letzte 30 Tage)
alpedhuez
alpedhuez am 25 Mär. 2018
Beantwortet: Walter Roberson am 25 Mär. 2018
Suppose I have a matrix A and suppose I want to create a new matrix from 1st, 3rd, and 4th column of A. Is there any compact way to do this?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 25 Mär. 2018
B = A(:,[1 3 4])

Weitere Antworten (0)

Kategorien

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

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by