Calculate elements in matrices

Hello I have two matrices with the same size, I want the numbers in the first matrix A to divide the numbers in the second matrix B, and collect the result in matrix C. For instance A=[12 6 4],B=[10 2 4], how cold I get[1.2 3 1]
Thank you

回答 (1 件)

David Goodmanson
David Goodmanson 2017 年 12 月 16 日

0 投票

Hi Pei,
To do multiply and divide operations element-by-element, put a dot in front of the mult or divide symbol. In this case, C = A./B agrees with the numerical example (although your explanation seems to be describing C = B./A)

カテゴリ

ヘルプ センター および File ExchangeSymbolic Math Toolbox についてさらに検索

タグ

質問済み:

2017 年 12 月 16 日

回答済み:

2017 年 12 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by