Union of cell matrix

1 回表示 (過去 30 日間)
raj singh
raj singh 2016 年 6 月 8 日
コメント済み: raj singh 2016 年 6 月 9 日
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

採用された回答

KSSV
KSSV 2016 年 6 月 8 日
unique(cell2mat(A))
  1 件のコメント
raj singh
raj singh 2016 年 6 月 9 日
Thanks....

サインインしてコメントする。

その他の回答 (1 件)

Stephen23
Stephen23 2016 年 6 月 8 日
>> A={[1 2 3] [2 8] [9 2 5]};
>> unique([A{:}])
ans =
1 2 3 5 8 9
  1 件のコメント
raj singh
raj singh 2016 年 6 月 9 日
Thanks.....

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by