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

조회 수: 2 (최근 30일)
Joey
Joey 2015년 4월 7일
편집: Matt J 2015년 4월 7일
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에서 Modeling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by