alternative options to prod
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
yonatan friedman
am 14 Dez. 2019
Kommentiert: yonatan friedman
am 14 Dez. 2019
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 Kommentare
Akzeptierte Antwort
David Hill
am 14 Dez. 2019
output=ones(1,size(input,2));
for j=1:size(input,1)
output=input(j,:).*output;
end
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!