MATLAB Precedence

Precedence is the order operations are performed.
(3^2) anything in parenthesis is done first.

PrecedenceOperation
1 (Highest)Parenthesis
2
Exponentiation
3
Logical NOT (~)
4
Multiplication, division
5
Addition, subtraction
6
Relational operators( >,  <,  >=,  <=,  ==,  ~= )
7
Logical AND ( & )
8 (Lowest)Logical OR ( | )