Effacer les filtres
Effacer les filtres

How to turn certain parts/blocks of a large matrix to zero while keeping the rest of the original matrix intact?

2 vues (au cours des 30 derniers jours)
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

Réponse acceptée

the cyclist
the cyclist le 21 Déc 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.

Plus de réponses (0)

Catégories

En savoir plus sur Multidimensional Arrays 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