compare two matrix one by one number to eachother

2 ビュー (過去 30 日間)
Elahe Karimi
Elahe Karimi 2019 年 5 月 18 日
コメント済み: Elahe Karimi 2019 年 5 月 18 日
hello,
I have two matrix like this image (Left matrix and rigth matrix ). I want to compare them , (so that the first number of matrix compare with the first number of other matrix and the second number is compared with the second number of the matrix and the third number with the third number of the other matrix ), and then the number of the equals were obtained.
In the next step, we'll compare three other (next) numbers and get the number of equals that are equal. Similarly, to the last row.
Please help me
thank you so much
WhatsApp Image 2019-05-18 at 10.29.08.jpeg
  1 件のコメント
madhan ravi
madhan ravi 2019 年 5 月 18 日
Picture not clear type an example and the desired output.

サインインしてコメントする。

採用された回答

madhan ravi
madhan ravi 2019 年 5 月 18 日
% a = > first matrix
% b = > second matrix
sum(a==b) % each column -> tells the number of counts of each matrix's column comparison
  1 件のコメント
Elahe Karimi
Elahe Karimi 2019 年 5 月 18 日
thank you so much for you'r Response.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by