I have an audio data set in terms of frequency(Y axis) vs frame (X axis) and want to detect values above a threshold that also stays beyond the value for more than a particular interval of frames and repeat using a loop. Can someone help me with it?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Frequency vs frame graph for 10 trials cross function to find point above trials? then also see if the value lies greater than the threshold for certain # of frames Looping for 10 set of 10 trials
0 Commenti
Risposte (1)
Carl
il 25 Lug 2017
Hi Niveditha. You can do this by first determining which elements of your frequency data are above the threshold, and then searching for a sequence of such elements. The code below creates a random vector, and searches for a sequence of 2 elements that are above the threshold of 0.5:
y = rand(10,1)
above_thresh = y > 0.5
num_frames = 2;
match = ones(num_frames,1);
findsubmat(above_thresh, match)
It makes use of the findsubmat File Exchange function found here:
Let me know if this works for you.
0 Commenti
Vedere anche
Categorie
Scopri di più su Audio Processing Algorithm Design in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!