Multiplication of elements of matrix without using for loop

1 次查看(过去 30 天)
Hello everyone!
I have 2 matrixs A and B.
A=[1.00 0.50 0.3333;
0.25 0.20 0.1666;
0.14 0.12 0.1111]
B=[1 2 3]
I want another matrix which is obtained by product of element column 1 of A and element column 1 of B and so on.
size of C should be equal to size of A.
expected C matrix
C= [ 1.00 1.00 0.9999
0.25 0.40 0.4998
0.14 0.24 0.3333]

采纳的回答

David Fletcher
David Fletcher 2021-4-3
A.*B
ans =
1.0000 1.0000 0.9999
0.2500 0.4000 0.4998
0.1400 0.2400 0.3333

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by