matlab index from the end of an array code example Example: matlab end of array last_value=array(end)