is there a way to put some threshold and count the number of times whenever the signal becomes above the threshold?
1 回表示 (過去 30 日間)
古いコメントを表示
is there a way to put some threshold and count the number of times whenever the signal becomes above the threshold, and depending on the number of times it takes some decision automaticlly
6 件のコメント
回答 (2 件)
Image Analyst
2022 年 12 月 14 日
[L, count] = bwlabel(data >= someThresholdValue)
count is the number of runs of your data at or above the threshold value.
0 件のコメント
Jan
2022 年 12 月 14 日
移動済み: Jan
2022 年 12 月 14 日
So currently you did not store the signal in a variable at all, but you directly plot it. Replace:
plot(recObj.getaudiodata());
by
signal = recObj.getaudiodata();
plot(signal);
Now you have a signal and can count the frames, which exceed the threshold.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Signal Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!