"Smoothing" an array of cells

I created a function that takes vectors for input variables and returns an array of cells for each set of inputs. The final output variable (output) appears to consist of a 2x1 cell containing two 1x5 cells. I have provided a screenshot below:

Screenshots of current output

I'm just trying to figure out how to smooth out an array of cells (out) as an array of 2x5 cells.

+7
arrays multidimensional-array matlab cell-array
source share
2 answers

One way to achieve this is

vertcat(cell_array1{:}) 
+7
source share

If your cell has an unequal number of elements in each row, maybe this might work better

 vector=[cell_array{:}] 
+3
source share

All Articles