How to turn certain parts/blocks of a large matrix to zero while keeping the rest of the original matrix intact?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi. I have a large weighted matrix, about 1000*7000 order. I need to turn certain blocks of this matrix (with known range of rows and columns) to zero, while keeping the rest of the matrix intact.
Any help will be highly appreciated.
Best regards, Shafique
0 comentarios
Respuesta aceptada
the cyclist
el 21 de Dic. de 2011
a = rand(1000,7000); % This represents your input array
a(1:3,6:9) = 0; % This zeros out the first three rows of columns 6 through 9.
a(1:10,1:10) % This shows the upper left corner of the array, to illustrate the zeroed out area.
Más respuestas (0)
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!