If i have a graph that levels off, how can i find the first x value this occurs at, on matlab?

1 次查看(过去 30 天)
I have a temperature VS time graph, and am looking for the first time(x) at which it levels off at a certain temp (y).
  2 个评论
Aisling Laverty
Aisling Laverty 2017-12-15
it was generated on simulink. i wondered if this would work?
Tstarfinal520= T_star_5_20(end); boundary520t=0.999*Tstarfinal520; %because it never is at dy/dx=0, so 99.9% should be ok.
place=find(T_star_5_20>=boundary520t); leveltime520t=tout(place(1))

请先登录,再进行评论。

回答(2 个)

KL
KL 2017-12-15
It depends on how you've stored your data. Let's you have them in a matrix,
data = [(1:10)' zeros(10,1)];
data(5,2) = 10;
data =
1 0
2 0
3 0
4 0
5 10
6 0
7 0
8 0
9 0
10 0
Let's say column 1 is time and 2 is temperature. I want to find the time when tepmerature is 10,
t = data(data(:,2)==10,1)
t =
5

Image Analyst
Image Analyst 2017-12-15
Perhaps use findchangepts().
Or use movstd() or stdfilt() and find the last element where the standard deviation in a window falls below a certain level.

类别

Help CenterFile Exchange 中查找有关 Data Distribution Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by