Get Last Index Of Array Matlab