index elements befor last matlab code example Example: matlab index last element first_3_values=array(end)