How to get the product multiplication of element matrix with equal size?

How to get the product multiplication of element matrix with equal size? I tray with this, but failed
X=pascal(4);
Y=magic(4);
Z(i,j)=X(i,j)*Y(i,j)

 採用された回答

per isakson
per isakson 2014 年 2 月 10 日
Try
X=pascal(4);
Y=magic(4);
Z=X*Y
Z=X.*Y
returns
Z =
34 34 34 34
69 101 101 69
125 217 219 119
206 396 403 185
Z =
16 2 3 13
5 22 30 32
9 21 36 120
4 56 150 20

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Image Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by