I had a matrix s of size 4*12540, i want to use only 4*4 of this matrix how should i remove extra columns?

1 visualización (últimos 30 días)
I had a matrix s of size 4*12540, i want to use only 4*4 of this matrix how should i remove extra columns?

Respuesta aceptada

Dishant Arora
Dishant Arora el 31 de Mzo. de 2014
A = yourArray(:,1:4);
or
yourArray(:,5:end) = [];

Más respuestas (1)

Joseph Cheng
Joseph Cheng el 31 de Mzo. de 2014
Editada: Joseph Cheng el 31 de Mzo. de 2014
If you want to completely remove these columns you can use [] ;
example:
Testmatrix = rand(4,12540);
Testmatrix(:,5:end) = [];%All rows in columns 5 through end are blank;

Categorías

Más información sobre Creating and Concatenating Matrices 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