multiplay colum of matrix

6 views (last 30 days)
Lior Genfon
Lior Genfon on 28 Mar 2020
Edited: Adam Danz on 31 Mar 2020
say i have matrix
a=[1,2,3;4,5,6;7,8,9]
i whant to get a vector that will be the multipal of every colum
the answer here [35;80;162]
how can i do this
  1 Comment
Adam Danz
Adam Danz on 28 Mar 2020
The correct product would be [28 80 162] if you're multiplying by column.

Sign in to comment.

Answers (1)

Adam Danz
Adam Danz on 28 Mar 2020
Edited: Adam Danz on 31 Mar 2020
y = prod(a);

Categories

Find more on Shifting and Sorting Matrices in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!