Guest User

Untitled

a guest
Aug 14th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. How do I find values close to a given value?
  2. i_lower = find(data <= b,1,'last');
  3. i_higher = find(data >= b,1,'first');
  4.  
  5. lower_than_b = data(i_lower)
  6. higher_than_b = data(i_higher)
Add Comment
Please, Sign In to add comment