It is possible with a loop:
w = [0.1, 0.1, 0.1, 0.1, 0.1];
n = length(w);
adj = [0.05*ones(n-1,1), -0.05*eye(length(w)-1)];
wg = bsxfun(@plus, w, adj);
for c = 2:n
adj(:,[c-1, c]) = adj(:,[c, c-1]);
wg = [wg; bsxfun(@plus, w, adj)];
end
which results in
wg =
0.150000 0.050000 0.100000 0.100000 0.100000
0.150000 0.100000 0.050000 0.100000 0.100000
0.150000 0.100000 0.100000 0.050000 0.100000
0.150000 0.100000 0.100000 0.100000 0.050000
0.050000 0.150000 0.100000 0.100000 0.100000
0.100000 0.150000 0.050000 0.100000 0.100000
0.100000 0.150000 0.100000 0.050000 0.100000
0.100000 0.150000 0.100000 0.100000 0.050000
0.100000 0.050000 0.150000 0.100000 0.100000
0.050000 0.100000 0.150000 0.100000 0.100000
0.100000 0.100000 0.150000 0.050000 0.100000
0.100000 0.100000 0.150000 0.100000 0.050000
0.100000 0.050000 0.100000 0.150000 0.100000
0.100000 0.100000 0.050000 0.150000 0.100000
0.050000 0.100000 0.100000 0.150000 0.100000
0.100000 0.100000 0.100000 0.150000 0.050000
0.100000 0.050000 0.100000 0.100000 0.150000
0.100000 0.100000 0.050000 0.100000 0.150000
0.100000 0.100000 0.100000 0.050000 0.150000
0.050000 0.100000 0.100000 0.100000 0.150000
Which is what I think you're after. It's probably possible without a loop as well but I'm sure this will suffice.