alternative options to prod
2 次查看(过去 30 天)
显示 更早的评论
input = [8 10 9 9 1
8 3 2 4 4
10 4 6 2 7
7 1 6 4 1]
output is = [4480 120 648 288 28]
and I can not use prod
0 个评论
采纳的回答
David Hill
2019-12-14
output=ones(1,size(input,2));
for j=1:size(input,1)
output=input(j,:).*output;
end
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!