find unique values in nested cell array

1 次查看(过去 30 天)
I have a nx1 cell array, with each row containing another cell array of variable size. I would like to isolate unique values in each nested array, while still keeping the structure of the larger cell array.
Help would be greatly appreciated. Thanks!

采纳的回答

Star Strider
Star Strider 2016-6-21
I’m not sure what you want.
This will give you the unique values amongst all the nested cells in your cell array:
C = {{randi(99, 1, 10)}; {randi(99, 1, 5)}; {randi(99, 1, 20)}};
C1 = [C{:}];
Cu = unique([C1{:}]);
  4 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Types 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by