Gating a channel

조회 수: 6 (최근 30일)
Sonia Wiemann
Sonia Wiemann 2011년 11월 21일
I am looking for code to gate a sound channel in matlab. I am using a file of data points on a sound wave that I will assign time points to, rectify, envelope, and smooth. Then I need to gate the channel telling the program anything above value "x" is 1 and anything below "x" is 0 so I end up with a square pulse that I can measure. This is the step I am stuck on any help is greatly appreciated.
Thanks! Sonia

채택된 답변

Walter Roberson
Walter Roberson 2011년 11월 21일
uint8(value > x)
Question: what do you want your output to be if the value is exactly x ?
  댓글 수: 2
Sonia Wiemann
Sonia Wiemann 2011년 11월 21일
Good point.....the code could be configured to tell the progrm value "x" or above is 1 and below "x" is 0.....
Walter Roberson
Walter Roberson 2011년 11월 21일
uint8(value >= x)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by