how to get the end of the array in matlab code example Example: matlab end of array last_value=array(end)