Extract some columns from a matrix

19 visualizzazioni (ultimi 30 giorni)
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?

Risposta accettata

Walter Roberson
Walter Roberson il 25 Mar 2018
B = A(:,[1 3 4])

Più risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by