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.
답변 (5개)
Walter Roberson
2022년 6월 3일
reduce = YourCell(positions_to_select)
Roberta di Pasquale
2022년 6월 3일
0 개 추천
댓글 수: 1
Walter Roberson
2022년 6월 3일
M = cell2mat(YourCell.');
reduced = M(RowsToSelect, ColumsToSelect) ;
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!