Detecting samples greater than a threshold and grouping.
Mostra commenti meno recenti
Hi all,
Lets say we have a vector: A = [1 2 3 5 2 3 5 2 5 3 10 8 9 11 14 1 4 3 3 4 5 3 2 3 4 5 6 4 2 2 3 4 5 6 6 2 2 3 4 11 23 12 56 23 12 34 12 1 3 4 1 2 3 4 5 ];
In the vector, I have applied a threshold of A>5 for detection of any samples greater than 5. So I detect all the bold samples.
However, as a second step, I want to group these samples. As in, first bold set goes to group 1 and second bold set goes to group 2 (All the consecutive samples goes to same group). How can I do it in Matlab in a way that their original indices in vector A are preserved?
Kind Regards
Anum
2 Commenti
the cyclist
il 29 Giu 2020
What specifically would you want the output to be, for that input vector A? "Goes to a group" is not enough information to design an algorithm.
Anum Ahmed Pirkani
il 29 Giu 2020
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Image Thresholding in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!