Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
Suresh R
Suresh R el 18 de Nov. de 2021
Respondida: Matt J el 18 de Nov. de 2021
how to do element wise multiplication of 2 columns in array?

Respuesta aceptada

Matt J
Matt J el 18 de Nov. de 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

Más respuestas (0)

Categorías

Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by