Left-to-right evaluation of chained operators

A student types the following four assignments into the MATLAB Command Window to check how MATLAB groups chained operators:


MATLAB
p = 2^3^2;
q = 2^(3^2);
r = 12/2/3;
s = 8/2^2*3;


Give the value MATLAB stores in each of the variables p, q, r and s. Each result is an exact integer; enter it with no decimal places.

Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Introduction to MATLAB Software Questions: