Detect spectrum from a signal
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/164715/image.jpeg)
Hi, I want to detect the complete lenght of a signal spectrum. How can I know the beginning and the end? It's because the signal is not always on the center of the file. I want to calculate it as show the image Thanks
Respuestas (1)
Star Strider
el 20 de Mayo de 2016
To define the ‘outline’ of your EMG signal, I would use the R2015b and later envelope function to create the envelope of the waveform, abs(hilbert(emg)) (which is the same thing in earlier releases), or a bandpass (or lowpass) discrete filter.
To design the filter, first do the fft of your signal to find the frequencies of interest, then design the filter using any of the several MATLAB Signal Processing Toolbox functions. My filter design procedure is here: How to design a lowpass filter for ocean wave data in Matlab? You will have to adjust the filter passband and stopband frequencies until you get the result you want.
Any of these will give you the EMG signal envelope. You then simply need to threshold that result to define the beginning and end of your EMG burst.
2 comentarios
Star Strider
el 23 de Mayo de 2016
My pleasure.
The envelope and hilbert functions have parameters you can adjust to give you the result you want, which is the ‘outline’ of your EMG data burst. The vector lengths they return will be the same size as the input vector regardless. To detect the onset and end of your EMG bursts, you would simply need to test for the threshold of the returned vectors of the envelope or hilbert calls. The find function is probably best for this, since it will pick up both the beginning and end values. Experiment with it to get the result you want.
Please plot the results of the envelope or hilbert calls with your data. The plots will tell you what the functions are doing.
I do not have your data, so I cannot be more specific.
Ver también
Categorías
Más información sobre Spectral Measurements en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!