Question
hi i have this code >> [x1, Fs] = wavread('chordA1.wav'); >> FFT1 = fft(x1); >> sq1 = abs(FFT1); >> sq1 = abs(FFT1); >> pks1 = getpeaks(sq1,'NPEAKS',20) when i run the the program it says ??? Error using ==> getpeaks Too many input arguments. what seems to be the problem?
Expert Answer
John Williams
PhD Expert
Answered Aug 24, 2026
Type help getpeaks and see what it says. Or get rid of all arguments and type the left parenthesis and see what intellisense pops up to guide you. Or put the cursor in findpeaks and type control-D and it should take you to the function where you can see what arguments it allows.
By the way, you didn't instead mean findpeaks() in the Signal Processing Toolbox, did you?
100% Run Guarantee
3-Hour Fast-Track Delivery
Need a Custom Version or Complete Simulation for This Problem?
Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.
Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here
Related matlab Questions & Solutions
Browse All →
Explore similar technical troubleshooting questions and verified MATLAB solutions:
Ready-to-Run MATLAB & Simulink Projects
Browse All Projects →