How to graph the outline of a curve

1 次查看(过去 30 天)
Hello.
I'm trying to plot (x,T) and want to just depict the upper limit curve. I tried to use other Matlab programs others have posted and the findpeaks equation, but I'm not getting much luck.
I want to plot this curve instead of filtering the data and distorting it in a way. Could anyone help me out please? Thank you for your time!

采纳的回答

Mohammad Abouali
Mohammad Abouali 2014-10-19
How does this work for you?
load Example
[pks,locs]=findpeaks(T,x,'MinPeakDistance',3);
plot(x,T);
hold on
plot(locs,pks,'r','LineWidth',3)
The redline is the upper bound.
  5 个评论
dj
dj 2014-10-20
Wow, typing x in front of (locs) makes THIS much difference? This is so weird. Yes, I do have R2013a version. Thank you, everyone. Sorry about the late feedback.
Mohammad Abouali
Mohammad Abouali 2014-10-20
I am guessing the x was not supported in the former version of MATLAB. Not sure but I think even R2014a didn't support it.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Title 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by