Why is this DFT of a real symmetric signal resulting in complex valued coefficients?
You defined the signal vector as x = [1 2 3 2 1]. Since the DFT is defined by

$$X[k]=\sum_{n=0}^{N-1}x[n]e^{-j2\pi nk/N}$$

the command fft(x) computes the DFT of the signal

$$x[n]=\delta[n]+2\delta[n-1]+3\delta[n-2]+2\delta[n-3]+\delta[n-4]$$

This signal is not symmetrical with respect to $n=0$, and it is not equal to the signal you computed the DTFT of.

If you want to compute the DFT of the signal

$$x[n]=\delta[n+3]+2\delta[n+1]+3\delta[n]+2\delta[n-1]+\delta[n-3]$$

you have to periodically continue it in the interval $n\in [0,N-1]$ (with $N=5$):

x = [3 2 1 1 2]

This results in a real-valued and symmetrical DFT, as expected:


X = fft(x);
X =

   9.00000   2.61803   0.38197   0.38197   2.61803