MATLAB: Select values in a cell 2105×1 cell or 1×2105 cell

cell

I ran a neural network and the output came as a matrix column of 2 vectors but in 1 cell. How do I get the corresponding 2 vectors from each cell and rearrange them into separate columns? Each cell has 2 values or variables in them thus: output{1,1} = [85;144] all the way to output{1,2105}. I want the first value (85) and the second value (144) of each cell so I can represent them as column vectors.
Thnaks

Best Answer

You do not have "a matrix column of 2 vectors but in 1 cell." Please see the description of a cell in the FAQ: https://matlab.wikia.com/wiki/FAQ#What_is_a_cell_array.3F
What you describe is a cell ARRAY (actually a row vector of 2105 cells), not a single cell. And you do not have "a matrix column of 2 vectors", what you have, more precisely, is a column vector of two scalars in each cell of the cell array.
You can use cell2mat() followed by an extraction of each row and transpose with the apostrophe operator:
for row = 1 : 2105
ca{row} = randi(99, 2, 1); Create random data.
end
whos ca
% Now we have our cell array and can begin.
m = cell2mat(ca) % Convert from cell array to a single double array, 2 rows-by-2105 columns.
% Get the first values as a column vector.
firstValues = m(1,:)'; % Make sure you transpose the first row to get a column vector.
% Get the second values as a column vector.
secondValues = m(2,:)'; % Make sure you transpose the second row to get a column vector
This will get you the column vectors you think you need/want.