Extract some columns from a matrix

14 vues (au cours des 30 derniers jours)
alpedhuez
alpedhuez le 25 Mar 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?

Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by