How to compare two lists

15 vues (au cours des 30 derniers jours)
Umer Khitab
Umer Khitab le 27 Mar 2018
Commenté : Jason le 8 Mai 2018
i have two lists lets say a=[1 2 3 ] and b =[1 2 3 4 5 ] and i want to compare each element of ' a ' with all elements of "b" it means that 1 is compared with whole list "b" then 2 is compared then 3 and if the element of "a" is member of "b" then output "a"else 0.

Réponse acceptée

Walter Roberson
Walter Roberson le 27 Mar 2018
a .* ismember(a, b)
  19 commentaires
Walter Roberson
Walter Roberson le 5 Avr 2018
With that test (and the speakers I was using) I could only hear a couple of pops in the mid 20's of Hz, and could not clearly hear a sound until around 33 Hz. Without headphones I would probably not be able to hear your 128 point 5 second sound, and possibly not even with headphones either. I would recommend you at least double your sampling frequency. (But 256 Hz should be fine.)
In what respect are the two files different?
Jason
Jason le 8 Mai 2018
Greetings, I’ve a similar question, but I'm trying to create a third matrix based on matching pairs of numbers in two other matrices. Current example:
a = [17,9;23,3;24,3;23,3;24,3;9,6;10,6;23,3;24,3;23,3]
b = [17,1;18,1;21,1;23,3;24,3;23,4;24,4;9,6;10,6;14,12;23,12;24,12;23,14]
My goal is to create 'c' where both columns in 'a' and 'b' are the same. So, row 1 of 'a' would be excluded, as would the first 2 rows of 'b', etc. etc.. Any help with accomplishing this task would be greatly appreciated.
Cheers, Jason

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Audio Processing Algorithm Design dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by