alternative options to prod
조회 수: 6 (최근 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개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!