Given myCellArray{10,3} = [];, I would like to fill in the first column with consecutive numbers (let's say 1 through 10). I know I could do it like this:
[myCellArray{1:10,1}] = deal(1,2,3,4,5,6,7,8,9,10)
myCellArray =
[ 1] [] []
[ 2] [] []
[ 3] [] []
[ 4] [] []
[ 5] [] []
[ 6] [] []
[ 7] [] []
[ 8] [] []
[ 9] [] []
[10] [] []
However, if my cell array is much larger (say 1,000 rows rather than 10), writing out the comma-separated values obviously becomes tedious:
[myCellArray{1:10,1}] = deal(1,2,3, ... ,1000)
Is there a way to create this comma-separated "list" of numbers automatically? Something like (1:10)? I know I could assign the values via loops, but is there an elegant one-line solution or something close to that?