MATLAB: How to concatenate cells arrays

concatenate cells

I have 2 cells array including A B , each has 4 cells. Each cell of A has 2 or 3 records (e.g. 10 columns and 1 row). B has 2 records.
How I can concatenate these two (A,B) to create new cell array C like below in the picture.
A={[1 1] [2 2 2]; [3 3] [4 4]} B={[5 5] [6 6]; [7 7] [8 8]} and I want
C={ [1 1 5 5] [2 2 2 6 6]; [3 3 7 7] [4 4 8 8] }
Thank you

Best Answer

A={[1 1] [2 2 2]; [3 3] [4 4]}
B={[5 5] [6 6]; [7 7] [8 8]}
C = cellfun(@(x,y)[x,y],A,B,'UniformOutput',false)