MATLAB Basics(15/40) Subarrays >Array indices start from 1 ·x(8) ·x=[-20914]; ??Error x2) ans 0 x(-1) x(4) ??Error ans 1 @日济大学 TONGJIUNIVERSITY
MATLAB Basics(15/40) Subarrays ➢ Array indices start from 1 • x = [ -2 0 9 1 4 ]; x(2) ans = 0 x(4) ans = 1 • x(8) ??? Error x(-1) ??? Error
MATLAB Basics(16/40) Subarrays >x=[-20914]: ·x(2)=5 X= -25914 ·x(4)=x(1) X= -259-24 ·x(8)=-1 X= CDHAW -259-2400-1 细月济大学 TONGJI UNIVERSITY
MATLAB Basics(16/40) Subarrays ➢ x = [ -2 0 9 1 4 ]; • x(2) = 5 x = -2 5 9 1 4 • x(4) = x(1) x = -2 5 9 -2 4 • x(8) = -1 x = -2 5 9 -2 4 0 0 -1