Delete a row of a cell containing a certain number
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Eli Dim
am 16 Jul. 2015
Kommentiert: Azzi Abdelmalek
am 16 Jul. 2015
I have a large cell array (a part of it I attached). This cell array contains other cells. My problem occurs at rows with contents similar to sequence{28,1} where I have zeros or numbers close to zero in the second column. How can I delete all rows which contain a number less than 0.001 in the second column. The numbers in the second column are cells themselves and the letters in the first columns are cells of characters.
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 16 Jul. 2015
Bearbeitet: Azzi Abdelmalek
am 16 Jul. 2015
A=A(A(:,2)>=0.001)
4 Kommentare
Azzi Abdelmalek
am 16 Jul. 2015
Cellfun allows you to apply any function you want to each cell. It's like a for loop, where x represent each cell at each increment. Read the Documentation
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!