MATLAB: How can i put cell value in a vector

cell

U =
1×2 cell array
[1×2 double] [1×2 double]
U contains these values in cell
U{1}
ans =
1 2
U{2}
ans =
2 3
s= []
I want to put the elements of U in s without duplicate value so I use this instruction: s=unique([U{:}])
this error "Cell contents reference from a non-cell array object." appear,

Best Answer

s=unique(cell2mat(U))