select first standard answer equal or greater than obtained answer

3 views (last 30 days)
Hi everyones,
I explain my question with an example :
H=180 (is obtained from an equation)
standard I=[100 150 200 250]
I want to select standard number for I which is equal or greater than H.
what should I do?

Accepted Answer

Thorsten on 23 Nov 2015
I(find(I>=H, 1, 'first'))

More Answers (0)


Find more on Get Started with MATLAB in Help Center and File Exchange


Community Treasure Hunt

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

Start Hunting!