How to select specific cell values indicating in a vector
Afficher commentaires plus anciens
I have a cell array with tracks from tracking of nuclei, these are 3799. The cell is 3799x1, inside each cell there are values from tracking.
I made an analysis in which I selected the right tracks of these 3799.
I made an excel file with the right tracks that now i want to analyze. So now i want analyze only 596 out of 3799. I wrote a script in which I read this file excel, and so now I have this matrix with right positions 596x1, ex. 1,4,11,13, that I selected from 3799 tracks.
Now i want to select the right tracks from the cell and eliminate values not right, how to say to matlab, that i want to mantain the tracks 1,4,11,13.. and eliminate the others.
So my output would be a new cell array with the right 596 tracks.
see cell array attached.
Réponses (5)
Walter Roberson
le 3 Juin 2022
reduce = YourCell(positions_to_select)
Roberta di Pasquale
le 3 Juin 2022
0 votes
Roberta di Pasquale
le 3 Juin 2022
0 votes
1 commentaire
Walter Roberson
le 3 Juin 2022
M = cell2mat(YourCell.');
reduced = M(RowsToSelect, ColumsToSelect) ;
Roberta di Pasquale
le 4 Juin 2022
0 votes
Roberta di Pasquale
le 4 Juin 2022
0 votes
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!