MATLAB: Converting a cell array of doubles in a matrix

cellcell arraysdoublematrix

I have a variable A which looks like this:
1×2 cell array
{1×9 double} {1×9 double}
I want to convert it to a matrix, i.e, the first row of matrix should be what's inside the A{1} and second row of matrix should be what's inside A{2}. A is a cell, but A{1} and A{2} are doubles. How can i do this?

Best Answer

A{1} = rand(1,9);
A{2} = rand(1,9);
cell2mat(A')
A =
1×2 cell array
{1×9 double} {1×9 double}
ans =
Columns 1 through 7
0.0844 0.3998 0.2599 0.8001 0.4314 0.9106 0.1818
0.1361 0.8693 0.5797 0.5499 0.1450 0.8530 0.6221
Columns 8 through 9
0.2638 0.1455
0.3510 0.5132