How to cut dimensions of 3d arrays in a cell.
Show older comments
I have one 34*1 cell.
every array in it have 3 dimensions, all same (720*360*365)
I want to know how to cut all arrays like this: (700:720 * 300:360 * :)

Accepted Answer
More Answers (1)
Alex Mcaulley
on 28 Oct 2019
Being A your cell array:
newA = arrayfun(@(i) A{i}(700:720,300:360,:),1:numel(A),'uni',0)
2 Comments
BN
on 28 Oct 2019
Alex Mcaulley
on 28 Oct 2019
Then, you can transpose the cell array:
newA = arrayfun(@(i) A{i}(700:720,300:360,:),1:numel(A),'uni',0)'
Categories
Find more on Operators and Elementary Operations 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!