Trendline with Slope of zero

16 ビュー (過去 30 日間)
Heather
Heather 2019 年 2 月 21 日
コメント済み: Heather 2019 年 2 月 25 日
Hello,
I have a vector of raw lamp radiance data, and a vector of the moving standard deviation of that data. I want to add a trendline for the range of the standard deviation in which the slope is zero, in order to show when the lamp is stable. I have used polyfit to place the trendline to the graph, but it is not perfectly straight over the entire range of data. Is there a function in MATLAB that does this for me, or do I just have to keep adjusting which range of data I would like to look at manually?

採用された回答

Image Analyst
Image Analyst 2019 年 2 月 23 日
A line with slope zero will have a fixed constant y value. If you know that y value, you can draw a line there with line():
line(xlim, [y, y], 'LineWidth', 2, 'Color', 'r');
grid on;
Attach your data if you want more help so we can offer a solution with your exact data.
  8 件のコメント
Image Analyst
Image Analyst 2019 年 2 月 24 日
What I would do it fit this to "the rate equation" and decide how far below the theoretical assymptote defines "stable" for you. I attach a rate equation fitting. See if you can adapt it to your data and determine when the assymptote is. It should be around 0.14835.
Heather
Heather 2019 年 2 月 25 日
This was excellent! Thank you so much! I adjusted it a few times and got just below and above the 0.14835 gridline. I really appreciate all of your help and explanations. I think I misunderstood which graph to plot the trendline on, so I appreciate you explaining the standard deviation graph to me.

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

その他の回答 (0 件)

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by