Marking the peak of a plot automatically without having to click on it
古いコメントを表示
Hi,
Is it possible to mark the peak of a plot automatically with a command without having to to mark on each plot.
採用された回答
その他の回答 (3 件)
Wayne King
2012 年 8 月 29 日
Do you know the value of the peak?, then yes, it's easy.
x = randn(100,1);
[val,I] = max(x);
plot(x); hold on;
plot(I,val,'r^','markerfacecolor',[1 0 0])
7 件のコメント
Lisa Justin
2012 年 8 月 29 日
編集済み: Lisa Justin
2012 年 8 月 29 日
Tom
2012 年 8 月 29 日
are you looking for one single maximum value, or are you looking for local peaks (i.e. the peaks of a sine wave where there can be several per plot)?
Lisa Justin
2012 年 8 月 29 日
Tom
2012 年 8 月 29 日
Then Wayne's code above should work fine.
Lisa Justin
2012 年 8 月 29 日
Tom
2012 年 8 月 29 日
It should be; can you provide some sample data?
Ilham Hardy
2012 年 8 月 29 日
Below link is the 'how-to' display tooltip syntactically..
Happy reading,
Ilham Hardy
2012 年 8 月 29 日
0 投票
4 件のコメント
Lisa Justin
2012 年 8 月 29 日
編集済み: Lisa Justin
2012 年 8 月 29 日
Jan
2012 年 8 月 29 日
Then use the output of the peakfinder and a simple TEXT command.
Lisa Justin
2012 年 8 月 29 日
Jan
2012 年 8 月 29 日
See "help text" and "doc text".
Sergio Yanez-Pagans
2021 年 3 月 28 日
0 投票
You could use my MATLAB File Exchange function:
Hope you find this useful!
カテゴリ
ヘルプ センター および File Exchange で Descriptive Statistics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!