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

1 次查看(过去 30 天)
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 个)

Community Treasure Hunt

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

Start Hunting!

Translated by