I have the following array:
d = [0,100,-100];
m = 300;
I want to select certain values of array d as follows:
So i want to select all the d values where m+d is beween 0 and 300 with both ends included. The result should look like [0,-100] and 100 should be excluded since it is out the defined range. However, I am getting d to be [0,100,-100]. Please let me know where I went wrong.