You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: spm_dem_reach_movie.m
    path of file: ./repos/malini/Codes/deconvolution - model/spm8/toolbox/DEM
    
    the code of the file until where you have to start completion: function spm_dem_reach_movie(DEM)
% creates a movie of the trajectory of a two-joint arm
% FORMAT spm_dem_reach_movie(DEM)
%
% DEM - DEM structure from reaching simulations
%__________________________________________________________________________
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging

    
function spm_dem_reach_movie(DEM)
% creates a movie of the trajectory of a two-joint arm
% FORMAT spm_dem_reach_movie(DEM)
%
% DEM - DEM structure from reaching simulations
%__________________________________________________________________________
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging

% Karl Friston
% $Id: spm_dem_reach_movie.m 3901 2010-05-27 16:14:36Z karl $


% evaluate positions (target)
%--------------------------------------------------------------------------
try
    v = DEM.pU.v{2};
    C = v(3,:);                                  % target color
    T = [v(1,end