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]
0 件のコメント
採用された回答
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 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!