How can i write x ∈ A
5 次查看(过去 30 天)
显示 更早的评论
B = [30 60 30 60 60 30];
[No,Th] = hist(B,unique(B));
A = Th;
i want to right in other program
x ∈ A
5 个评论
John D'Errico
2015-12-19
Yes. We know what set membership means in mathematics. But what you are not telling us is what you want to do. Explain yourself clearly.
回答(1 个)
Walter Roberson
2015-12-19
编辑:Walter Roberson
2015-12-19
for x = reshape(A,1,[])
... do something ...
end
1 个评论
Walter Roberson
2015-12-19
unique(x) gives the elements of X. In the context you give in your comment, the values are going to be the same as 1 : length(unique(B))
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!