Borrar filtros
Borrar filtros

Gating a channel

1 visualización (últimos 30 días)
Sonia Wiemann
Sonia Wiemann el 21 de Nov. de 2011
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

Respuesta aceptada

Walter Roberson
Walter Roberson el 21 de Nov. de 2011
uint8(value > x)
Question: what do you want your output to be if the value is exactly x ?
  2 comentarios
Sonia Wiemann
Sonia Wiemann el 21 de Nov. de 2011
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 el 21 de Nov. de 2011
uint8(value >= x)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with Signal Processing Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by