How to convert cell array to double?

1 次查看(过去 30 天)
I have U like that :
U =
1×2 cell array
[1×2 double] [1×2 double]
>> U{1}
ans =
1 2
>> U{2}
ans =
2 3
I want to extract value of U and put them in an array sitem= [ ] without duplicate value

采纳的回答

Stephan
Stephan 2019-12-9
c = {[1 2],[2 3]}
s = cell2mat(c)
s = unique(s)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

产品


版本

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by