How does zero padding effect phase of an FFT? I thought that symmetric zero padding in the center of an image or signal produces no phase change in the FFT (See Here), but I am getting different results experimentally.
Consider I have a signal $x[n]$
$$ x = [ 1,1,1,1,1] $$
then $X = fft(x)$ $$ X = [5 ,0,0,0,0] $$
and the phase of $X$ is zero for all $n$.
If I try to symmetric zeropad in order to preserve phase I do the following:
$$ z = [1,1,1,0,0,0,1,1] $$
and $Z=fft(z)$: $$ Z = [5,2.4,-1,-0.4,1,-0.4,-1,2.4] $$
and the phase of $Z$ is
$$ \angle Z = [0 ,0,\pi,\pi,0,\pi,\pi,0] $$
Which appears that phase has not been preserved. I would expect the phase to be zero for all bins if the phase was preserved. Can someone help me understand this? Thanks!