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

2 次查看(过去 30 天)
DY
DY 2023-12-25
回答: kei hin 2023-12-25
例:
T的数值中包含14,9,16这3个种类的值,
T = [14 14 9 16 9 9 16 14];
如何对T进行函数处理,得到3这个答案?

采纳的回答

kei hin
kei hin 2023-12-25
num = length(unique(T));

更多回答(0 个)

类别

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

标签

Community Treasure Hunt

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

Start Hunting!