フィルターのクリア

How to put lines with pre-defined slopes on a plot

2 ビュー (過去 30 日間)
Qaisar Latif
Qaisar Latif 2021 年 4 月 29 日
コメント済み: Mathieu NOE 2021 年 4 月 30 日
Hi all. I want to put lines with pre-defined slopes (i.e. between 0.85 and 1.15) onto a matlab plots. Any help is much appreciated.Thanks
  3 件のコメント
Qaisar Latif
Qaisar Latif 2021 年 4 月 30 日
Hi Jan, Thanks for the comment. I have two datsets x and y. when I do the log log plotting I get the above plot.
There are certain data points in x and y that corresponds to a slope of 1, i.e., x(1:15, 1) and y(1:15, 1) and there are other points that give a slope of 0.85 and so forth.
What I want to do is to keep the original plot and then put a line with slope 1 or 0.85 on top of it. This way I can graphically represent that certain range of data points in original data set matches with a line of slope 1/0.85.
I hope this clarifies the problem.
Mathieu NOE
Mathieu NOE 2021 年 4 月 30 日
hello
you simply have to compute the derivative of your data (gradient )and search the points where the slope reaches the two targeted values
it's then fairly simple to draw a portion of line knowing the x and y coordinates and the slope

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

回答 (0 件)

カテゴリ

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

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by