retrieve single element in cell array
显示 更早的评论
Hi
I have the 1x100 cell that consists of 16x16 double array data for each cell. I want to retrieve a single element let sat at row 2, column 1 for each array data in each cell and put the retrieve data from all 100 cell as another array data. How can I do this?
attached is my cell data.
回答(2 个)
In just one line, where array is your cell array:
out = cellfun(@(m)m(2,1),array)
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!