It would be easy to fill every alternative entry. To do it with a simple vector you can do something like:

x = zeros(50,1);

x(1:2:length(x)) = x(1:2:length(x)) + 1;

But I'm shaky on my matlab and I don't know if this is really the right way to do it. Some food for thought though.