select first standard answer equal or greater than obtained answer

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

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by