Filter löschen
Filter löschen

Detect spectrum from a signal

1 Ansicht (letzte 30 Tage)
Julio Martín
Julio Martín am 20 Mai 2016
Kommentiert: Star Strider am 23 Mai 2016
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

Antworten (1)

Star Strider
Star Strider am 20 Mai 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 Kommentare
Julio Martín
Julio Martín am 23 Mai 2016
Hi!, I've used it and returns complete value of signal (I'm sure I'm wrong). For example if file lenght is 14000 msec., returns again 14000 msec., and not only signal lenght and location (what I want to detect). Sentence must begin with (for example) B=envelope(.......?. Sorry because my mathematics are absolutely.... Thanks so much
Star Strider
Star Strider am 23 Mai 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.

Melden Sie sich an, um zu kommentieren.

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by