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_dcm_dem.m
    path of file: ./repos/bspm/thirdparty/spm12/toolbox/dcm_meeg
    
    the code of the file until where you have to start completion: function DCM = spm_dcm_dem(DCM)

    
function DCM = spm_dcm_dem(DCM)
% Estimate parameters of a DCM-DEM model
% FORMAT DCM = spm_dcm_dem(DCM)
%
% DCM
%    name: name string
%       Lpos:  Source locations
%       xY:    data   [1x1 struct]
%       xU:    design [1x1 struct]
%
%   Sname: cell of source name strings
%
%   options.trials       - indices of trials
%   options.Lpos         - source location priors
%   options.Tdcm         - [start end