stop a cycle when finds the right value
1 ビュー (過去 30 日間)
Good Morning, I am a new MAtlab user, and I have a simple question to ask: let's suppose that I have a range of data, for example:
and I want to find the nearest value to a precise value (f.e. 622), BUT I NEED to do it with a cycle structured more or less like that:
if 622+i = FOUND in the MATRIX
STOP (I don't know how to say stop in MATLAB)
Substantially, I must search the value step by step adding 1 to the default value.