How do I create array with values from a specific location within each cell of a cell array.

10 views (last 30 days)
I want to create an array with all the values at location(1,2) in each cell of this cell array, it should be simple but doesn't seem to be working for me. (each cell is a 2x2).

Accepted Answer

madhan ravi
madhan ravi on 30 Sep 2020
Wanted = cellfun(@(x) x(1,2), cell_array)

More Answers (0)

Community Treasure Hunt

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

Start Hunting!