필터 지우기
필터 지우기

Finding a maximum signal variation in MATLAB

조회 수: 6 (최근 30일)
Jimmy
Jimmy 2015년 8월 5일
댓글: Image Analyst 2016년 5월 22일
I have a signal which consist of one 1000000x1 array (data) and one 1000000x1 array (time). I'm having problem to detect the location where the signal have the largest variation with respect to the value of the array.
For example in this signal, I want to locate the variation of the signal from time 4 until 11. I found out that findpeaks command will detect all peaks but I want to detect only the highest peak(highest value from the array) and the data (eg: 5000 sampling) to the right and left from the highest peak.
Thank you in advance.

채택된 답변

Star Strider
Star Strider 2015년 8월 5일
If you are only finding one peak each time, I would use the max and min functions, each with two outputs, to get the absolute maximum and minimum. The second output is the index location of the maximum or minimum.
You can also use the Signal Processing Toolbox findpeaks function on the original signal to get the value and location of the highest peak, the use findpeaks again on the negative of the original signal to get that highest value and location.
  댓글 수: 39
Star Strider
Star Strider 2016년 5월 22일
I do not have enough recent experience with wavelets to provide the guidance you need.
It would be best if you post this as a new Question.
Jimmy
Jimmy 2016년 5월 22일
I see. Ok noted. Thank you for the tutorial and guidance that you have been given since I posted this question. It was a great help.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Image Analyst
Image Analyst 2015년 8월 5일
편집: Image Analyst 2015년 8월 5일
Just threshold and call bwareaopen(). See my answer here: http://www.mathworks.com/matlabcentral/answers/231181#answer_187244
  댓글 수: 5
Jimmy
Jimmy 2015년 8월 6일
The attached file contains the 1000000x1 data array and 1000000x1 time array.
Figure below shows the output of the signal from the coding: plot(time,data)
I want to extract the signal only from area 1 to 2
Thank you
Jimmy
Jimmy 2015년 8월 6일
This is the attached file.
Thank you

댓글을 달려면 로그인하십시오.


Greg Dionne
Greg Dionne 2015년 8월 24일
You could also try envelope:
envelope(data-mean(data),20000,'rms')
rmsEnv = envelope(data-mean(data),20000,'rms');
envTime = time(rmsEnv>0.02);
envData = data(rmsEnv>0.02);
plot(envTime, envData)
  댓글 수: 3
Star Strider
Star Strider 2015년 8월 24일
It’s a FEX contribution. There appear to be several like it.
Image Analyst
Image Analyst 2016년 5월 22일
envelope() is now in the Signal Processing Toolbox. I haven't played around with it yet so I don't have a demo on this function.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Bartlett에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by