Effacer les filtres
Effacer les filtres

Deleting Cells in Matrix

2 vues (au cours des 30 derniers jours)
sam van Bohemen
sam van Bohemen le 20 Fév 2020
Commenté : Walter Roberson le 20 Fév 2020
I have a Matrix 32x5
Looking at every row one at a time.
Am I able to delete all cells that are 3 greater or 3 less than the other cells in that row and then add a zero to the bottom of the column of the deleted cell to keep the matrix complete?
Thanks
  3 commentaires
sam van Bohemen
sam van Bohemen le 20 Fév 2020
Hi Walter,
Yes i mean column entries
Thanks
Walter Roberson
Walter Roberson le 20 Fév 2020
num2cell with 1 as the second parameter. That will give you a cell array of column vectors you can process individually. Loop might be easiest. For each delete as appropriate, then pad out to the common length, store back. cell2mat to get back to the array form.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Matrix Indexing 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