A = randi(18,4,4,3);
B = randi(10,4,4,3); %The initial arrays with size (4x4x3)
out1 = cellfun(@(x,y)cross(x,y),num2cell(reshape(A,[],3),2),num2cell(reshape(B,[],3),2),'un',0);
out = reshape(cat(1,out1{:}),size(A));
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!