Trouble using findpeaks : Too many output arguments.

Hello, I am using [pkt,lct,wt,ct]=findpeaks(data) to find the peakheight, location, width and prominence of the peaks in my data. This gives me error message 'Too many output arguments'.
However, When I am using [pkt, lct]=findpeaks(data), there is no error. Please suggest the solution. Please help.

 채택된 답변

Star Strider
Star Strider 2014년 12월 1일

0 개 추천

The ‘expanded’ findpeaks return syntax is new to R2014b. The online documentation defaults to the most recent release, so will not necessarily be correct for prior releases as well.

댓글 수: 2

Thanks. I suppose mine is R2014a since I am getting following answer to which -all findpeaks
/Applications/MATLAB_R2014a.app/toolbox/signal/signal/findpeaks.m /Applications/MATLAB_R2014a.app/toolbox/signal/signal/@dspdata/findpeaks.m
My pleasure.
If I remember correctly, MATLAB licenses cover the full year, so you should be able to download and install R2014b as part of your current license. That will give you access to the new version of findpeaks.
Don’t uninstall R2014a, because the HG2 graphics in R2014b take a bit of time to learn. HG2 also has less flexibility than previous versions of MATLAB graphics (at least in my opinion).

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

추가 답변 (1개)

Image Analyst
Image Analyst 2014년 12월 1일
What version are you using? Is it possible that the 3rd and 4th outputs were added in a later version than you have? What does the help documentation say - does it list all 4 output arguments? What does this say
which -all findpeaks

댓글 수: 1

Getting this /Applications/MATLAB_R2014a.app/toolbox/signal/signal/findpeaks.m /Applications/MATLAB_R2014a.app/toolbox/signal/signal/@dspdata/findpeaks.m

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

카테고리

질문:

2014년 12월 1일

댓글:

2014년 12월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by