MATLAB: A < b < c < d, what does this Boolean return for different values of a, b, c and d
MATLAB
if I have an if statement: if a < b < c < d
what is the behavior here where a, b, c and d are numeric. Is there an order of operation?
Best Answer
As stated onthis documentation page, all the relational operators are at the same level of precedence. Therefore they are evaluated left to right as stated at the beginning of that page.
This doesnot, as you might think, return true if a, b, c, and d are in strictly ascending order. To test that condition I would use theissorted function on the vector [a b c d] with one of the direction flags.
I posed this question in maple forum they proposed a method but my machine could not solve it because of high order matrix. I guess, Matlab is powerful in numerical computations, so switched to Matlab. look at;
Best Answer