Turn off the plot of findpeaks function

조회 수: 8 (최근 30일)
Sara Cecilia Abecia Hernanz
Sara Cecilia Abecia Hernanz 2021년 6월 15일
Hello everyone,
I am using to analyse a set of spectra with the findpeaks function included in the Signla Processing Toolbox. I am interested in calculating the width and the prominence of the peaks identified by the function as well as their location and value. However, I just want the function to compute these values, but I do not want the function to plot the signal with the details of each one of the peaks. Is there a way to turn the plot off?
Thanks in advance!
Sara

채택된 답변

KSSV
KSSV 2021년 6월 15일
You might be simply using the function findpeaks with data as input. Take the output.
data = [25 8 15 5 6 10 10 3 1 20 7];
findpeaks(data) % this will plot the figure
pks = findpeaks(data) % this will not plot
pks = 1×3
15 10 20
  댓글 수: 1
Sara Cecilia Abecia Hernanz
Sara Cecilia Abecia Hernanz 2021년 6월 15일
That was it! I just revised my code and I had forgotten to delete a call to the findpeaks function without any outputs, as you said. Thank you and have a great day :D

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

추가 답변 (0개)

카테고리

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

태그

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by