MATLAB: Replace elements of a cell

cellreplace part of

I wrote the following code:
testcell={'R1(2)' 'R1(1)' 'R1(0)'};
vfinal = cell(4,10);
vfinal(1:3) = testcell
I was expecting that the result was:
vfinal =
'R1(2)' 'R1(1)' 'R1(0)' [] [] [] [] [] [] []
[] [] [] [] [] [] [] [] [] []
[] [] [] [] [] [] [] [] [] []
[] [] [] [] [] [] [] [] [] []
But the result was:
vfinal =
'R1(2)' [] [] [] [] [] [] [] [] []
'R1(1)' [] [] [] [] [] [] [] [] []
'R1(0)' [] [] [] [] [] [] [] [] []
[] [] [] [] [] [] [] [] [] []
Any tips?
Thank you.

Best Answer

testcell={'R1(2)' 'R1(1)' 'R1(0)'};
vfinal = cell(4,10);
vfinal(1,1:3) = testcell
Related Question