Effacer les filtres
Effacer les filtres

fastest way to divide a matrix columns into two matrices ?

1 vue (au cours des 30 derniers jours)
farzad
farzad le 20 Mar 2015
Commenté : farzad le 20 Mar 2015
Hi All
I have an m*n matrix
I want to take out the fifth column (all the m rows) to one matrix , and alll of the other collumns , to another , how to do that ?

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 20 Mar 2015
Modifié(e) : Azzi Abdelmalek le 20 Mar 2015
%If A is your matrix
A=randi(10,5,8) % example
c5=A(:,5) % the fifth column
B=A(:,[1:4 6:m]) % remaining matrix

Plus de réponses (0)

Catégories

En savoir plus sur 3-D Scene Control 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