Borrar filtros
Borrar filtros

fastest way to divide a matrix columns into two matrices ?

1 visualización (últimos 30 días)
farzad
farzad el 20 de Mzo. de 2015
Comentada: farzad el 20 de Mzo. de 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 ?

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 20 de Mzo. de 2015
Editada: Azzi Abdelmalek el 20 de Mzo. de 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

Más respuestas (0)

Categorías

Más información sobre 3-D Scene Control en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by