Find overlap between 2 arrays?

14 visualizaciones (últimos 30 días)
JamJan
JamJan el 20 de Mayo de 2019
Respondida: madhan ravi el 20 de Mayo de 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?

Respuesta aceptada

madhan ravi
madhan ravi el 20 de Mayo de 2019
intersect(A,B)

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by