a = ...
s = [size(a,1) size(a,2)];
b = permute(a(:,:,[1 3]),[3 1 2]); % chose the slides here
r = arrayfun(@(k)prod(cat(1,b{:,k}),1),reshape(1:numel(i),s),'unif',0)
% Bruno
s = [size(a,1) size(a,2)];
b = permute(a(:,:,[1 3]),[3 1 2]); % chose the slides here
r = arrayfun(@(k)prod(cat(1,b{:,k}),1),reshape(1:numel(i),s),'unif',0)
% Bruno