MATLAB: How to program to check the sequence 0

hi.
i have written a program in which 4 angles are derived (alpha1, alpha2, alpha3,alpha4). now i have to check whether they are in sequence or not. if not then i have to find again these angles. kindly help me how i program it to verify above condition. thanks in advance
Regards

Best Answer

MATLAB supports binary relational operators only, so one cannot chain comparisons together as a<b<c, this needs to be written as a<b & b<c. You might want something like this:
val = 0<alpha1 && alpha1<alpha2 && alpha2<alpha3 && alpha3<alpha4 && alpha4<pi/2;
Related Question