Use of findpeaks graphical output in app designer

5 次查看(过去 30 天)
Hello,
I wanted to use the graphical output of the findpeaks function of MATLAB, but I cannot manage to get the output in my graphe, as this line does not work.
findpeaks(app.UIAxes,data-y1,'MinPeakProminence',app.MinprominenceEditField.Value,'MinPeakWidth',app.MinmiddlewidthEditField.Value);
And if I remove the
app.UIAxes
part, I does open a new figure.
Thank you !
  1 个评论
Milad Cheraghzade
Milad Cheraghzade 2019-7-18
编辑:Milad Cheraghzade 2019-7-18
Hello , I had the same problem today! And I just found the answer! Try to don't use hold on to plot two data (I mean the original data and the peak points which you are looking for)! Plot them in the same line. For example Plot ( [data1],'g',[data2],'rs') Where each data can be the pks and locs data as the output of findpeaks function Data1 =original data which could be as x data or x y data. Data 2 =[locs,pks]

请先登录,再进行评论。

回答(1 个)

Marcin Mróz
Marcin Mróz 2019-6-2
Did You found solution to this problem?

产品

Community Treasure Hunt

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

Start Hunting!

Translated by