Basics

11. Array Addressing

>> x = 1:10;
>> y = sin(x)
y =
  Columns 1 through 7 
    0.8415  0.9093  0.1411 -0.7568 -0.9589  -0.2794    0.6570
  Columns 8 through 10 
    0.9894    0.4121   -0.5440
>>

>> y(3)
ans =
    0.1411

>> y(1:5)
ans =
    0.8415    0.9093    0.1411   -0.7568   -0.9589

>>