This error occurs because you are trying to fill the variable part with more (or less) values than its size. In other words, you have an operator A(:)=Bwhere size(A(:))differs from size(B).
rand(3) 3x3, output(ii) - ( output , output(ii) - output), , rand(3), output.
, output, , .
. , , . output=zeros(3,3,10).
for ii= 1:10
output(:,:,ii)=rand(3);
end
output . , , . rand(ii);
for ii= 1:10
output{ii}=rand(ii);
end
, , , , .
, , dbstop if error . , MATLAB , size(rand(ii)) size(output(ii)), .
, , .
, , , , . , , MATLAB, , .