As you are replacing all the elements of the matrix..why you want to go for replace? You create a different matrix itself.....
u = rand(1,4) ;
v = rand(1,4) ;
iwant = [u ; u ;v ;v ]
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!