Hello eveeryone, i have 2 matrices lets say A=[1,2,3,4,5,6,7,8] B = [1,11,12,3,3,5] what i want is to have such a result C=[1,3,3,5] what i want is compare two matrices ok that we can do that with intersect(), but in intersect function i only have [1,3,5], that is not what i want. what i want is even if it is repeated in matrix B compare with A and then have a matrix of C. The A and B sizes changing for each simulation. Can you help me please?
MATLAB: Finding the elements in two matrices with different sizes
intersectmatrixnumber of elementsrepeating elements
Related Question
- Deleting number
- Does something similar to ‘intersect’ command exists for more than 2 vectors
- Hello, I have two matrices of different sizes and I want to find the indices for the elements in the bigger matrix that match with those in the smaller one, allowing for repetition
- How to find the common elements of 2 cell arrays of strings
Best Answer