필터 지우기
필터 지우기

is there a way to put some threshold and count the number of times whenever the signal becomes above the threshold?

조회 수: 11 (최근 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
Image Analyst 2022년 12월 14일
Sure. Use bwlabel if you have the Image Processing Toolbox.
[L, count] = bwlabel(data >= someThresholdValue)
count is the number of runs of your data at or above the threshold value.

Jan
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.

카테고리

Help CenterFile Exchange에서 Signal Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by