I have a 128 X 8192 matrix. I have split it into cell arrays of size 1X64 each using :
C = mat2cell(input_matrix, repmat(1,[1 128]), repmat(64,[1 128]));
Now I need to pass each of these cell arrays to an function say 'fn_X'. This function returns an array of varying sizes. I need the output for each of the cell arrays passed to be stored in a result matrix. I used the following code :
for(irl = 1 : 128)
for(jrl = 1 : 128)
Output_matrix(irl,jrl) = fn_X(C{irl,jrl});
end
end
This gave me an error 'Subscripted assignment dimension mismatch.'
I then tried it in a column matrix using the following code :
king = 1;
for(irl = 1 : 128)
for(jrl = 1 : 128)
Output_matrix(king) = fn_X(C{irl,jrl});
king = king + 1;
end
end
This gave me an error 'In an assignment A(I) = B, the number of elements in B and I must be the same.'
I also tried using cell array assignment using the following code :
king = 1;
for(irl = 1 : 128)
for(jrl = 1 : 128)
Output_matrix(king) = fn_X(C{irl,jrl});
king = king + 1;
end
end
This gave an error 'Cell contents assignment to a non-cell array object.'
Any suggestions on how I can handle this?