Using Matlab's filter() function for solving difference equation with initial conditions
The problem is the definition of the initial condition of the function filter(). Note that according to the mathworks reference page, filter is implemented using a direct-form II transposed structure. If you look at the corresponding diagram, you see that the filter states (called $w_k(m)$ in the figure) are defined after multiplication with the respective filter coefficients.

So in your example if you want to initialize filter with some past output value $y[-1]$, your initial state is given by $y[-1]\cdot 0.5$ because that's the value of the input of the delay element.

y = filter(num_coef, den_coef, x, 0.5)

should give you the expected result.

Note that for the general case there's the function filtic, which computes the necessary initial conditions given past output samples (and, if necessary, past input samples). For your example you would use the command

zi = filtic(num_coef, den_coef, 1)

which results in zi = 0.5, as explained above.