Polyphase decimation matlab
The problem is in the input signals to your polyphase filters. They should be delayed and subsampled versions of the input signal, like in the following code fragment:

M=8;    % downsampling factor
L=256;  % length of input signal, integer multiple of M
x=randn(L,1);  % input signal
h = fir1(127, 1/M);
yp = zeros(L/M, 1);

for i = 1:M,
    xtmp = [zeros(i-1,1); x];  % delayed input signal
    tmp = filter( h(i:M:end), 1, xtmp(1:M:L) );  % polyphase filtering
    yp = yp + tmp;  % accumulate outputs of polyphase filters
end

% compare with standard filtering
y = filter ( h, 1, x);
yM = downsample( y, M );

n=1:L/M;
plot(n,(yM-yp)/max(yM))