I have a cell matrix
A={[1 2 3] [2 8] [9 2 5]};
I want unique value or union of A.
The solution should be like this = [1 2 3 5 8 9]
Please give me the

 Accepted Answer

KSSV
KSSV on 8 Jun 2016

1 vote

unique(cell2mat(A))

More Answers (1)

>> A={[1 2 3] [2 8] [9 2 5]};
>> unique([A{:}])
ans =
1 2 3 5 8 9

Categories

Find more on Operators and Elementary Operations in Help Center and File Exchange

Asked:

on 8 Jun 2016

Commented:

on 9 Jun 2016

Community Treasure Hunt

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

Start Hunting!