how to acces vector matlab code example
Example 1: get elements of array matlab
Indicating indexes between ([]) retrieves corresponding values in Matlab.
array_borders=array([1: end])
As end defines size of the array, retrieve first and last border values of array
Example 2: matlab matrix indexing
v = [16 5 9 4 2 11 7 14];
v(3) % Extract the third element (ans = 9)