Find overlap between 2 arrays?

조회 수: 14 (최근 30일)
JamJan
JamJan 2019년 5월 20일
답변: madhan ravi 2019년 5월 20일
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?

채택된 답변

madhan ravi
madhan ravi 2019년 5월 20일
intersect(A,B)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by