Finding the first intersection point between 2 lines
古いコメントを表示
Hello all,
I need to find the time constant for which I plotted a line at y = 63% of the maximum value (y_max)
The other line comes from a Simulink model in which I can switch between different parameters, the output (y) differs every time (the line isn't plotted from a function). I'm using the following code which uses the 'interp1' function:
y_tau = 0.63*y_max;
[y,idx] = unique(y);
t = t(idx);
t_constant = interp1(y,x,y_max)
However, this always gives the second intersection point in the graph (see picture below). In this particular case:
t_constant = 190.2194
. How can I get the first intersection point using this code or any other method? Thank you in advance.
採用された回答
その他の回答 (2 件)
カテゴリ
ヘルプ センター および File Exchange で Specialized Power Systems についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
