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?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Carl
2017년 7월 25일
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
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!