You need to keep in mind that
size(dummy(i))
is going to return a vector, and that using 1:(a vector) is not going to give you what you want.
You also need to remember that after accessing
dummy = array{i};
then dummy will either be a regular array or a cell array (depending on what was stored there.) If it is regular array, such as an array of doubles, then dummy(i) is going to be either an error (because there are not at least "i" elements in the array) or else a single numeric value. size() of a single numeric value is [1 1], and so is not interesting. If dummy has become a cell array, then dummy(i) is going to be either an error (because there are not at least "i" elements in the cell array or else is going to be the size of a single cell, which again is going to be [1 1]. If dummy was a cell array, then size(dummy{i}) would be the size of what is stored at dummy(i) and would be of interest.
It is not clear why you would be proceeding "diagonally" in "array", taking the "i"'th element of "array" and then taking the "i'th" element of the result ?
