필터 지우기
필터 지우기

Error while running findpeaks().

조회 수: 6 (최근 30일)
Aravind Kota
Aravind Kota 2018년 3월 8일
댓글: Walter Roberson 2018년 3월 8일
When I am trying to find peaks and widths of the peaks, I am getting errors related to findpeaks(). The error is:
Error using findpeaks>parse_inputs (line 131)
Expected a string for the parameter name, instead the input type was 'double'.
Error in findpeaks (line 71)
[X,Ph,Pd,Th,Np,Str,infIdx] = parse_inputs(Xin,varargin{:});
Error in aaaa (line 12)
findpeaks(PeakSig,x,'Annotate','extents','WidthReference','halfheight')
I guess this is happening because of the using annotate and extents in findpeaks() function. Kindly help me resolve this issue. Thanks in advance.
  댓글 수: 1
Aravind Kota
Aravind Kota 2018년 3월 8일
I am using Matlab 2014a version. Any input in this regard is appreciated.

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

채택된 답변

Walter Roberson
Walter Roberson 2018년 3월 8일
In R2014a, it was not permitted to pass in x or fs in the second position: you had to go directly from the signal to the name/value pairs. Also, the 'Annotate' and 'WidthReference' options were not yet defined in R2014a. See https://www.mathworks.com/help/releases/R2014a/signal/ref/findpeaks.html for the documentation of findpeaks for your version.
The call you are trying to use was defined starting in R2014b.
  댓글 수: 2
Aravind Kota
Aravind Kota 2018년 3월 8일
Thanks for the information. I was doubting the same. Is there any alternative to this function to find the peak widths in the current version.
Walter Roberson
Walter Roberson 2018년 3월 8일
There are some peak finders in the File Exchange.
You are trying to use the variation of findpeaks that plots the output. Automatic plotting of the output was not supported until R2014b.

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by