how to count the match
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
if suppose I am matching some value with another values in loop and want to calculate no of matched and unmatched sequences .What code should I add for count?
0 Kommentare
Antworten (2)
per isakson
am 21 Jul. 2012
I guess that if you are not more specific you'll get an answer like this :)
number_of_matches = 0;
...
if is_match
number_of_matches = number_of_matches + 1;
end
0 Kommentare
Eristoff Abhi
am 21 Jul. 2012
As i am assuming that you are comparing two strings or two set of string: for eg: a={'count'} b={'count1', 'count2', 'count3','library','class','link'} now u can do x=strmatch(a,b); mat=length(x); unmat=length(b)-mat;
I hope this answer your doubt.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!