Similar answer as in the previous thread:
Lets begin with the error message:
You can use previously calculated values in a program, but ...You compare a difference of x with y.2c. x is a vector whose elements are three element vectors, so x[i-x[i-1 is a vector while y.2c is a scalar. Thats throwing the error. Whats the purpose of that comparison? Would you like the absolute value of the difference of those vectors to be smaller than the y values?
The break statement can never trigger as you are asking if a three element vector (x[i) is equal to a scalar (R). Again it does no harm but could be deleted. Don't know what the purpose of that break should have been, but you have be aware that it will only break out of the j-loop.
The statements to the left of your four if statements should be instructions to be executed if the condition to the right of the if is true. In your program these are boolean expressions themselves. Think they should be local assignments.
I think that there is an error in condition of the four if-statements. The first compares the difference of x[i and x[i+1 while the next three would compare the diff between x[i and x[j.
Strongly think that this should be the same for all four. If you use j you run into troubles as j is runníng from 1 to 3 and at the beginning 2 and three are invalid indices for x. If i+1 is meant, then the j-loop would be useless and should be omitted. The same calculations are done three times which doesn't make sense. Does no harm but slows down without benefit
See attached. This time I haven't deleted the j-loop and the break statement.
BTW, if I am right concerning the 4 if statements you could delete the four of them and replace them with a single line (see below).

Edited: While the one-liner above is correct its not so easy to read and comprehend. Have it replaced by two if/otherwise statements.