Find overlap between 2 arrays?

28 views (last 30 days)
JamJan
JamJan on 20 May 2019
Answered: madhan ravi on 20 May 2019
Hi,
I have two arrays:
A = [806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 841 842 843 844 845 846 847 848 849 850 851 852 853 854 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 888 889 890]
B = [809 810 811 812 813 828 829 830 831 832 833 834 835 836 837 838 839 840 852 853 854 855 856 857 858 859 860 861 862 863 876 877 878 879 880 881 882 883 884 885 886 887 899 900 901 902 903 904 905 906 907]
Now I want to know which specific numbers (so not the index (since these numbers represent indices), are part of A and B. How can I do this?

Accepted Answer

madhan ravi
madhan ravi on 20 May 2019
intersect(A,B)

More Answers (0)

Categories

Find more on Multidimensional Arrays in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!