load SampleData
CA{:} % original
ans = 3×13 cell array
{2×153 double} {2×154 double} {2×156 double} {2×154 double} {2×156 double} {2×155 double} {2×154 double} {2×151 double} {2×152 double} {2×152 double} {2×154 double} {2×154 double} {2×161 double}
{2×153 double} {2×154 double} {2×156 double} {2×154 double} {2×156 double} {2×155 double} {2×154 double} {2×151 double} {2×152 double} {2×152 double} {2×154 double} {2×154 double} {2×161 double}
{2×153 double} {2×154 double} {2×156 double} {2×154 double} {2×156 double} {2×155 double} {2×154 double} {2×151 double} {2×152 double} {2×152 double} {2×154 double} {2×154 double} {2×161 double}
ans = 3×11 cell array
{2×415 double} {2×408 double} {2×428 double} {2×422 double} {2×438 double} {2×429 double} {2×438 double} {2×428 double} {2×414 double} {2×418 double} {2×432 double}
{2×415 double} {2×408 double} {2×428 double} {2×422 double} {2×438 double} {2×429 double} {2×438 double} {2×428 double} {2×414 double} {2×418 double} {2×432 double}
{2×415 double} {2×408 double} {2×428 double} {2×422 double} {2×438 double} {2×429 double} {2×438 double} {2×428 double} {2×414 double} {2×418 double} {2×432 double}
ans = 3×11 cell array
{2×441 double} {2×437 double} {2×413 double} {2×417 double} {2×444 double} {2×436 double} {2×421 double} {2×441 double} {2×428 double} {2×417 double} {2×422 double}
{2×441 double} {2×437 double} {2×413 double} {2×417 double} {2×444 double} {2×436 double} {2×421 double} {2×441 double} {2×428 double} {2×417 double} {2×422 double}
{2×441 double} {2×437 double} {2×413 double} {2×417 double} {2×444 double} {2×436 double} {2×421 double} {2×441 double} {2×428 double} {2×417 double} {2×422 double}
AA = repmat(A,size(CA{1},1),1);
BB = repmat(B,size(CA{2},1),1);
CC = repmat(C,size(CA{3},1),1);
CA_5 = { ...
cellfun(@(x,y) [x;y], CA{1}, AA,'uni',0) ...
cellfun(@(x,y) [x;y], CA{2}, BB,'uni',0) ...
cellfun(@(x,y) [x;y], CA{3}, CC,'uni',0) ...
};
CA_5{:} % new
ans = 3×13 cell array
{5×153 double} {5×154 double} {5×156 double} {5×154 double} {5×156 double} {5×155 double} {5×154 double} {5×151 double} {5×152 double} {5×152 double} {5×154 double} {5×154 double} {5×161 double}
{5×153 double} {5×154 double} {5×156 double} {5×154 double} {5×156 double} {5×155 double} {5×154 double} {5×151 double} {5×152 double} {5×152 double} {5×154 double} {5×154 double} {5×161 double}
{5×153 double} {5×154 double} {5×156 double} {5×154 double} {5×156 double} {5×155 double} {5×154 double} {5×151 double} {5×152 double} {5×152 double} {5×154 double} {5×154 double} {5×161 double}
ans = 3×11 cell array
{5×415 double} {5×408 double} {5×428 double} {5×422 double} {5×438 double} {5×429 double} {5×438 double} {5×428 double} {5×414 double} {5×418 double} {5×432 double}
{5×415 double} {5×408 double} {5×428 double} {5×422 double} {5×438 double} {5×429 double} {5×438 double} {5×428 double} {5×414 double} {5×418 double} {5×432 double}
{5×415 double} {5×408 double} {5×428 double} {5×422 double} {5×438 double} {5×429 double} {5×438 double} {5×428 double} {5×414 double} {5×418 double} {5×432 double}
ans = 3×11 cell array
{5×441 double} {5×437 double} {5×413 double} {5×417 double} {5×444 double} {5×436 double} {5×421 double} {5×441 double} {5×428 double} {5×417 double} {5×422 double}
{5×441 double} {5×437 double} {5×413 double} {5×417 double} {5×444 double} {5×436 double} {5×421 double} {5×441 double} {5×428 double} {5×417 double} {5×422 double}
{5×441 double} {5×437 double} {5×413 double} {5×417 double} {5×444 double} {5×436 double} {5×421 double} {5×441 double} {5×428 double} {5×417 double} {5×422 double}