How to find a slope of signal if we do not know the value of x1, x2, y1, y2

5 ビュー (過去 30 日間)
Matlaber
Matlaber 2019 年 2 月 13 日
コメント済み: Star Strider 2019 年 2 月 18 日
How can we find the slope of a signal if we do not know the value of x1, x2, y1, y2
which we cannot use
Slope = (y2 - y1) / (x2 - x1);
Example:
load sunspot.dat
year = sunspot(:,1);
avSpots = sunspot(:,2);
[pks,loc]=findpeaks(avSpots,year, 'Annotate','extents','WidthReference','halfheight')
axis([1700 1711 0 100])
give a graph of
Thank you

採用された回答

Star Strider
Star Strider 2019 年 2 月 13 日
I am not certain what you intend by ‘slope of a signal’. You can easily determine the derivatives of the signal with the gradient (link) function.
  6 件のコメント
Matlaber
Matlaber 2019 年 2 月 18 日
Thanks a lot!
Star Strider
Star Strider 2019 年 2 月 18 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by