Values were being stored as uint16, changed the inputs to double to get it working.
How to find positive and negative outputs?
12 views (last 30 days)
Hi, I'm trying to have a= dif<-100 or dif>100 with dif being the difference between two numbers, but having trouble getting the negative values to work.
I currently have it as
dif=struct.smth(:,10) - struct.smth(:,i)
num = (dif <-100) | (100 < dif);
I have also tried
but still only get the positive values to work.
The output when the negative number is triggered is "0x1 empty double column vector"