I have question about usage of 'shiftdim' command

When I run VFItoolkit-matlab-examples-master\EpsteinZinPreferences.m
there are error message, and error point is below

PolicyMatrix_l = l_grid(shiftdim(Policy(1,:,:),1)); %% ???
PolicyMatrix_kprime = k_grid(shiftdim(Policy(2,:,:),1));

Policy is matrix, and l_grid is 31 by 1 vector
**Why shiftdim command is required ? **
and how do I have to fix to run the code

I have just run the EpsteinZinPreferences.m on my computer and did not get any error.

What exactly is the error message that you get? What version of matlab are you using?

shiftdim is being used to turn Policy(1,:,: ) which is of dimension 1-by-N_a-by-N_z into dimension N_a-by-N_z. Think of it as doing the same as reshape() but faster.