www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/ProductofElementsinEachColumnExample.m
%% Product of Elements in Each Column %% % Create a 3-by-3 array whose elements correspond to their linear indices. A=[1:3:7;2:3:8;3:3:9] %% % Find the product of the elements in each column. The length of the first % dimension is 1, and the length of the second dimension matches % |size(A,2)|. B = prod(A)