Detect spectrum from a signal
4 次查看(过去 30 天)
显示 更早的评论
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
回答(1 个)
Star Strider
2016-5-20
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 个评论
Star Strider
2016-5-23
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spectral Measurements 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!