Match values of the standart with the sample. (pattern recogniton)

1 回表示 (過去 30 日間)
Rafael Freire
Rafael Freire 2011 年 9 月 14 日
I have those vectors above. A=sample, a,b,c=standart The value zero is when the sample don't have the variable an the value one is when the variable is present.
A=[0 0 0 0 1 0 1 0 1 1 1 1 0 0 0 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 1]
a=[0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1]
b=[0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
c=[1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0]
How can i correlate the values in a,b,c with the values in A. In other words, how can i find a,b,c in A and the percent o match? Expected results:
a=~~90% in A
b=100% in A
c= 0% in A
Best regards

採用された回答

Walter Roberson
Walter Roberson 2011 年 9 月 14 日
100 * sum(a & A) / sum(a)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by