matrix manipulation

how to remove row(s) or column(s) of a matrix and save the new matrix with different name? and is there any limit on how big of matrix that can be processed by matlab?

 Respuesta aceptada

Chandra Kurniawan
Chandra Kurniawan el 21 de Dic. de 2011

1 voto

Just use [] for any column or row that you want to remove.
Eq :
A = round(10*rand(10));
B = A;
B(3, :) = []

4 comentarios

eri
eri el 21 de Dic. de 2011
oh i see, so the idea is make a copy of the matrix and remove the row/column. but how to remove multiple rows/columns?
and is there any size limit of matrix that can be processed by matlab?
Chandra Kurniawan
Chandra Kurniawan el 21 de Dic. de 2011
Just add a row list. List of row or column that you want to remove.
A = round(10*rand(10))
B = A;
Remlist = [1 3 5 7];
for x = 1 : length(Remlist)
B(x, :) = [];
end
B
For limit, I think Matlab doesn't limit the size for any matrix.
IThe capability depends on your memory [RAM]
eri
eri el 21 de Dic. de 2011
thank you
Friedrich
Friedrich el 21 de Dic. de 2011
MATLAB has a maximum size of matrices. It is limited by the amount of elements in a matrix not by the dimension. The computer command gives you that limit:
[str,maxsize] = computer returns the integer maxsize, the maximum number of elements allowed in an array with this version of MATLAB
And of course the it depends on the memory and bitness of your system:
http://www.mathworks.com/support/tech-notes/1100/1107.html#1

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

eri
el 21 de Dic. de 2011

Community Treasure Hunt

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

Start Hunting!

Translated by