MATLAB Function Reference |
Syntax
B = prod(A)
B = prod(A,dim
)
Description
若 A
是多維陣列,sum(A)
會從第一個非單一維度(the first nonsingleton dimension)開始進行每一維度的乘積運算。
B = prod(A,
根據所給定的維度 dim
)
dim
來進行乘積運算。
Examples
M = magic(3) M = 8 1 6 3 5 7 4 9 2
prod(M) = 96 45 84
prod(M,2) = 48 105 72
See Also
printdlg | profile |