How can i write x ∈ A

5 ビュー (過去 30 日間)
Triveni
Triveni 2015 年 12 月 19 日
コメント済み: Walter Roberson 2015 年 12 月 19 日
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
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.
Triveni
Triveni 2015 年 12 月 19 日
Actually i have to create bound in Genetic Algorithm Optimization....I need only values of subset of A. My B matrix is changing B(:,:,k). And by using unique values of B, create x matrix.

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

回答 (1 件)

Walter Roberson
Walter Roberson 2015 年 12 月 19 日
編集済み: Walter Roberson 2015 年 12 月 19 日
for x = reshape(A,1,[])
... do something ...
end
  1 件のコメント
Walter Roberson
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 ExchangeLogical についてさらに検索

タグ

タグが未入力です。

製品

Community Treasure Hunt

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

Start Hunting!

Translated by