fork download
  1. A = {{1 2; 3 4}, {5 6;7 8}, {9 0; 1 2}; {3 4; 5 6}, {7 8; 9 0}, {11 22; 33 44}};
  2. B = [2,3];
  3.  
  4. arrayfun(@(x) A{1,x}{2,2}, B)
  5.  
  6. cellfun(@(c)c{2,2}, A(1,B))
  7.  
Success #stdin #stdout 0.17s 64960KB
stdin
Standard input is empty
stdout
ans =

   8   2

ans =

   8   2