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

1 visualizzazione (ultimi 30 giorni)
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

Risposta accettata

Walter Roberson
Walter Roberson il 14 Set 2011
100 * sum(a & A) / sum(a)

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by