Azzera filtri
Azzera filtri

How to remove a specific object from cell

2 visualizzazioni (ultimi 30 giorni)
I have a cell containing objects.
AllObjects = {obj1 , obj2 obj3 ....., obj10}
i want to remove obj3 from AllObjects cell.

Risposta accettata

Adam Danz
Adam Danz il 20 Ago 2019
Modificato: Adam Danz il 21 Ago 2019
Try this out
% identify the index of cell array "AllObjects" that contains "obj3"
idx = cellfun(@(x)isequal(x,obj3),AllObjects); %logical index
% Remove that index from cell array
AllObjects(idx) = [];

Più risposte (1)

JIAYING WU
JIAYING WU il 20 Ago 2019
AllObjects(3) = [ ];

Categorie

Scopri di più su Matrices and Arrays in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by