Indicating indexes between ([]) retrieves corresponding values in Matlab. array_borders=array([1 end]) As end defines the size of the array, retrieve its first and last border values