How to select specific cell values indicating in a vector

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)

Sorry and how to mantain the same value in a matrix 222x3799?
No, sorry, because i just have the matrix i don't want to transform the cell in a matrix.
i have just the matrix 222x3799, and I want to mantain the position as before 1,4,11,13... i tried
reduce = YourMatrix(positions_to_select) but it does not work.
And iI also tried newmatrice = matriceOld(222, position_to_select), but it does not work

Products

Release

R2022a

Community Treasure Hunt

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

Start Hunting!