Filter löschen
Filter löschen

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

3 Ansichten (letzte 30 Tage)
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?

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Shifting and Sorting Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by