MATLAB Answers

How to find common elements in each row of two different matrices?the output must be an array whose rows are made up with the element in common of each row of the matrices in input

5 views (last 30 days)
Sorry I am a very beginner in Matlab but I hope someone could explain me where I made a mistake and how I could get the output requested. Thank you Matrix A 363×1226 Matrix B 363x1226 Qq=1:363 For C(qq,:) =intersect(A(qq,:), B(qq, :) ; End
Camilla Ancona
Camilla Ancona on 17 Apr 2020
Thank you very much for helping me. Yes the length of each row can vary depending on the number of the elements in common.

Sign in to comment.

Accepted Answer

SaiDileep Kola
SaiDileep Kola on 9 Apr 2020
Yes, the above provided example should give some insight in to getting your output
for further study refer to link, to learn accessing matrices

More Answers (0)

Community Treasure Hunt

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

Start Hunting!