Ideas for creating an Automatic Threshold value from a variable vector

5 Ansichten (letzte 30 Tage)
Hi guys!
I'm dealing with a vector variables (of double type) which values varies depending the system is analyzed (its dimension also varies depending the characteristic of the system).
For example, lets suppose i have the following vector of numbers,
Error=[0.2 0.35 0.5 0.25 0.4 0.15 0.45 1.5 2.5 2].
You can observe that the 7th first values are lower than the last ones. So I would like to set an automatic Threshold that only include only the 7th first values of the vector, since they are significantly smaller than the last ones.
As you can see, since my system can chance, i need that the Threshold value change with it.
Thanks a lot for any idea!
  2 Kommentare
Walter Roberson
Walter Roberson am 20 Dez. 2022
You need to decide how to tell whether a set of values are "significantly smaller" than other ones.
I notice that your values increase and decrease. What do you want to have happen if the values rise to "significant" in the middle but with "insignificant" between that and the end? Such as
Error=[0.2 0.35 0.5 1.25 0.4 0.15 0.45 1.5 2.5 2].
supposing that 1.25 is "significant" in this context.
Mariana
Mariana am 20 Dez. 2022
Thanks for your answer, Walter.
In the phenomenum i'm studying, there would not be that case (a significantly variation in the middle of the vector).
I have no any way to quantify how bigger the last values are than the 7th first values, i only know that they will be discrepant from them.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Steven Lord
Steven Lord am 20 Dez. 2022
Take a look at the ischange function.
Error=[0.2 0.35 0.5 0.25 0.4 0.15 0.45 1.5 2.5 2];
changepoint = ischange(Error);
results = table(Error.', changepoint.', 'VariableNames', ["Error", "Change Point"])
results = 10×2 table
Error Change Point _____ ____________ 0.2 false 0.35 false 0.5 false 0.25 false 0.4 false 0.15 false 0.45 false 1.5 true 2.5 false 2 false

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by