You are here

Operator Precedence

8 October, 2015 - 17:29

MATLAB allows us to build mathematical expressions with any combination of arithmetic operators. The order of operations are set by precedence levels in which MATLAB evaluates an expression from left to right. The precedence rules for MATLAB operators are shown in the list below from the highest precedence level to the lowest.

  1. Parentheses ()
  2. Power (^)
  3. Multiplication (*), right division (/), left division (\)
  4. Addition (+), subtraction (-)