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: EvalFnOnAgentDist_AggVars_FHorz_fastOLGe.m
    path of file: ./repos/VFIToolkit-matlab/EvaluateFnOnAgentDist/TransPathFHorz
    
    the code of the file until where you have to start completion: function AggVars=EvalFnOnAgentDist_AggVars_FHorz_fastOLGe(AgentDist,Policy, FnsToEvaluate,FnsToEvaluateParamNames,AggVarNames,Parameters,l_d,n_a,n_z,n_e,N_j,daprime_gridvals,a_gridvals,z_gridvals_J, e_gridvals_J)
% fastOLG: so (a,j)-by-z-by-e
% Policy is in Kron form
% No z is treated elsewhere

    
function AggVars=EvalFnOnAgentDist_AggVars_FHorz_fastOLGe(AgentDist,Policy, FnsToEvaluate,FnsToEvaluateParamNames,AggVarNames,Parameters,l_d,n_a,n_z,n_e,N_j,daprime_gridvals,a_gridvals,z_gridvals_J, e_gridvals_J)
% fastOLG: so (a,j)-by-z-by-e
% Policy is in Kron form
% No z is treated elsewhere

% daprime_gridvals is [N_d*N_aprime,l_d+l_aprime]
% a_grivdals is [N_a,l_a]
% z_gridvals_J is [N_j,N_z,l_z] (will use shiftdim( ,-1) to make it [1,N_j,N_z,l_z])
% e_gridvals_J is [N_j,1,N_e,l_e] (will use shiftdim( ,-1) to make it [1,N_j,1,N_e,l_e])

% parameters that depend