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

1 visualización (últimos 30 días)
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

Respuesta aceptada

Walter Roberson
Walter Roberson el 14 de Sept. de 2011
100 * sum(a & A) / sum(a)

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by