How to count the frequency of repeated values in an array of values with the index position?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
John Doe
le 28 Sep 2019
Réponse apportée : the cyclist
le 28 Sep 2019
clc
clear
t=0:.001:10;
y=sin(2*pi*t);
I want to count the frequency of repeated values in 'y' . How can I do that? I also want to print out the index position where value is being repeated.
Thanks!
0 commentaires
Réponse acceptée
the cyclist
le 28 Sep 2019
Be aware, though, that due to accuracy of floating point numbers, you may not get exact repeated values when you expect them.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matrix Indexing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!