Effacer les filtres
Effacer les filtres

How to access a columns and two or more columns at constat interval and make a sperate matrix?

3 vues (au cours des 30 derniers jours)
A=[1 2 3 4 5 6 7 8 9 11 12 12 14 15 16 17 18 19 20;1 2 3 4 5 6 7 8 9 11 12 12 14 15 16 17 18 19 20;1 2 3 4 5 6 7 8 9 11 12 12 14 15 16 17 18 19 20]
A = 3×19
1 2 3 4 5 6 7 8 9 11 12 12 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 11 12 12 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 11 12 12 14 15 16 17 18 19 20
I need 1st ,6th 11th columns as a matrix and a matrix excluding those columns?

Réponse acceptée

Matt J
Matt J le 30 Jan 2022
B=A(:,[1,6,11]);
C=A;
C(:,[1,6,11])=[];

Plus de réponses (0)

Catégories

En savoir plus sur Shifting and Sorting Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by