How to select specific cell values indicating in a vector
Show older comments
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.
Answers (5)
Walter Roberson
on 3 Jun 2022
reduce = YourCell(positions_to_select)
Roberta di Pasquale
on 3 Jun 2022
0 votes
Roberta di Pasquale
on 3 Jun 2022
0 votes
1 Comment
Walter Roberson
on 3 Jun 2022
M = cell2mat(YourCell.');
reduced = M(RowsToSelect, ColumsToSelect) ;
Roberta di Pasquale
on 4 Jun 2022
0 votes
Roberta di Pasquale
on 4 Jun 2022
0 votes
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!