Taking min of a vector and all values within 10% error

1 次查看(过去 30 天)
I need a way to get all the values within a 10% error of the minimum value of a vector. How could I go about that?

采纳的回答

Matt J
Matt J 2015-4-7
编辑:Matt J 2015-4-7
This considers both positive and negative min(x),
xmin=min(x);
coeff=1+0.1*sign(xmin);
values = x(x<=coeff*xmin)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Elementary Math 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by