Hi , i have a matrix and need to extract the column in this way , thank you
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
mina massoud
am 19 Mai 2019
Bearbeitet: madhan ravi
am 19 Mai 2019
clear all
clc
A=[ 1:16;17:32;33:48;49:64] ;
% i need to exctract the [ 1 5 9 13 ] column vectro from matrix A and put them in another matrix B with diminsion 4x4
% the rest of the column i need them in another matrix C with dimensione 4x12
% thank you
0 Kommentare
Akzeptierte Antwort
madhan ravi
am 19 Mai 2019
idx= [ 1 5 9 13 ];
A(:,idx) % 4 X 4
A(:,setdiff(1:size(A,2),idx)) % 4 X 12
1 Kommentar
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Resizing and Reshaping 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!