I don't understand why the following works. It initializes row 1 of the array c with values of 1 in roughly the first half of the columns and then places a zero in the exact middle column (half way) while also placing zeros in the right half of the columns. So, if the number of columns is 11, columns 1 through 5 are initialized with 1 and columns 6 through 11 with zero.
I would have thought that the way to do this is to specify the zeros from columns (N+1)/2 to N. More like:
So if N = 11, the script, 2) would result in:
c(1,:)=[ones(1,(10)/2),zeros((11+1)/2,11)] or c(1,:)=[ones(1,5),zeros(6,11)]
So, Matlab just knows that in 1) above to continue counting from the column where it stopped putting ones to start putting in values of zeros for the remaining columns. So, rather than an absolute reference like I've shown in 2), it uses a relative reference to decide which columns to initialize?