How to set up a value limit to measure a waveform

1 view (last 30 days)
I got one (sin) waveform which will attenuate and floating. And i want to know, for example, when will the peak to peak(or the whole waveform) magnitude is smaller than 100(or a certain value)?

Answers (2)

dpb
dpb on 30 Jul 2014
a)
find((max(w)-min(w))<Limit,1)
b)
find(abs(w)<Limit,1)
w is the waveform, Limit is your setpoint/comparison value.
  2 Comments
Frank
Frank on 31 Jul 2014
Sorry, the first one gives me a blank result. because this is not exactly a sin wave but a normal waveform. Any possible solution to that or using a window to check?
dpb
dpb on 31 Jul 2014
a) will only give a blank result if the pk-pk difference is never less than the Limit value set. Every signal has a max() and a min() and the difference is, by definition, the pk-pk range over the duration.

Sign in to comment.


Image Analyst
Image Analyst on 31 Jul 2014
Will you need to first find the "envelope" of the decaying sine wave? Please attach a picture of your signal, and the actual signal in an m-file if you can.
  7 Comments
Frank
Frank on 1 Aug 2014
For example, the image will 'recover', which means it could be flat or floating in a small region. And i want to know the time that, after it the waveform will not float exceed 10. and i could call this time as recover time.
Image Analyst
Image Analyst on 1 Aug 2014
You need to define the window width of the region. Would it be the entire signal, or just some portion of the signal. When deciding whether a value at x=12 is in a range of 10 in y, do you want to look from 0 to 20? Or just within the local x=10 to 14 range?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!