Here's an example function in MATLAB that evaluates if a value is in a range:
main.m223 chars9 lines
You can call this function by passing in the value you want to check, along with the start and end of the range you want to check against:
main.m94 chars3 lines
The function will return a boolean value indicating whether the value is within the specified range.
gistlibby LogSnag