how to do element wise multiplication of 2 columns in array?

3 Ansichten (letzte 30 Tage)
Suresh R
Suresh R am 18 Nov. 2021
Beantwortet: Matt J am 18 Nov. 2021
how to do element wise multiplication of 2 columns in array?

Akzeptierte Antwort

Matt J
Matt J am 18 Nov. 2021
For example,
A=randi(10,5,2)
A = 5×2
1 10 4 8 6 7 4 5 7 5
A(:,1).*A(:,2)
ans = 5×1
10 32 42 20 35

Weitere Antworten (0)

Kategorien

Mehr zu Resizing and Reshaping Matrices 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!

Translated by