フィルターのクリア

Determine the X coordinate in the 2D plot???

1 回表示 (過去 30 日間)
Nitesh
Nitesh 2015 年 9 月 12 日
コメント済み: Nitesh 2015 年 9 月 12 日
Hello
I have performance plot which i need to select the best settling time,rise time and peak OS for step response for my new gain values based on them. Lets say, i wana determine the values of the settling time for a set of simulation using
ts(n-1)=s1.SettlingTime;
where n<=15
yy are the 21 values of iteration. All the settling time are given as yy below.
Now using
ymin=min(ts)
i get the min value of 6.4943 seconds
i can get the minimum time without referring to the plot. which in my plot is also same as in red.The x-axis is the iteration number.. which is 21 iterations (0-20) and y are the different settling time values.
Now my issue is, what command should i use that my program will automatically choose the min value from the Y-axis and determine its cooresponding X-axis (iteration number) so that i can you for next task of my program.
Please help me. Thank you.

採用された回答

Geoff Hayes
Geoff Hayes 2015 年 9 月 12 日
Nitesh - get the index of the minimum value of y and use that index to access the corresponding iteration. So
[ymin, yminIdx] = min(y);
yminIteration = x(yminIdx);
In the above, I am assuming that x is the corresponding vector with iteration information (and that all values of y are distinct). See min for details on the second output parameter of this function.
  1 件のコメント
Nitesh
Nitesh 2015 年 9 月 12 日
Thank you so much.
This command stores the value for me to use it further into my program. Thanks.
Nitesh.

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by