MATLAB: Fill part of vector

MATLABvectors

I have a=[1 2 5 4 2 7 4 8 2 3](10 values),b=[0 1 2 3],I want to fill a so that
a=[0 1 2 3 0 0 0 0 0 0],

Best Answer

There's nothing left so there's no point in doing anything except sotoo--
a=0; a(1:length(b))=b;
a=[b zeros(1,length(a)-length(b)];
An essentially innumerable ways to get there, choose one and go on.