Azzera filtri
Azzera filtri

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

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

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Shifting and Sorting Matrices in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by