fe=peven(f); fe=peven(f,dim);
peven(f) returns the even part of the periodic sequence f.
peven(f,dim) does the same along dimension dim.