You have 3 elements in ‘A(1,:)’ and 2 in ‘A(2,:)’. That is not permitted in double arrays.
Empty elements in cell arrays are allowed:
However, calculating with such arrays as double arrays remain as not permitted. Fill the ‘empty’ element with NaN if you must, although it will likely result in NaN results of calculations with that matrix.