Divide elements between 2 matrices
古いコメントを表示
I have a matrix
M1 =[4 3 6 8 1 10 5 2 9 4 5 6
1 10 3 9 4 2 5 7 6 5 4 3
9 5 1 7 8 10 3 4 2 6 5 1];
M2 =[1 6 3 5
3 5 9 6
2 1 9 5];
If it is column 1, 5, or 9 in M1 then divide by column 1 in M2 If it is column 2, 6, or 10 in M1 then divide by column 2 in M2 If it is column 3, 7, or 11 in M1 then divide by column 3 in M2 If it is column 4, 8, or 12 in M1 then divide by column 4 in M2
and it will give an output of a matrix 3x12
output =[4 0.5 2 1.6 1 1.66667 1.66667 0.4 ...
0.33 2 0.33 1.5 1.33 0.4 0.5556 1.116 ...]
.
.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!