Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: Using @times or @prod with cellfun

$
0
0
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

Viewing all articles
Browse latest Browse all 19628

Trending Articles