如何得到一个由数字构成的向量中有几组数字?

例:
T的数值中包含14,9,16这3个种类的值,
T = [14 14 9 16 9 9 16 14];
如何对T进行函数处理,得到3这个答案?

 採用された回答

kei hin
kei hin 2023 年 12 月 25 日

0 投票

num = length(unique(T));

その他の回答 (0 件)

カテゴリ

タグ

質問済み:

DY
2023 年 12 月 25 日

回答済み:

2023 年 12 月 25 日

Community Treasure Hunt

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

Start Hunting!