finding the percentage of concordance
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Abdullah Zamil
le 28 Mar 2015
Commenté : Abdullah Zamil
le 28 Mar 2015
- Hello, I want to calculate the percentage of image not presented to image is presented *
function ham_dis = rec_test(train,impostures)
ham_dis = [];
for g=1:5
for j=1:339
ham_dis(j,:)= sum(sum(abs(impostures(g,:)-train(j,:))));
if (ham_dis(j,:) < 7374)
disp('image is present');
else
disp('image not present');
end
end
end
end
thanks
0 commentaires
Réponse acceptée
Image Analyst
le 28 Mar 2015
I have no idea what "the percentage of image not presented to image is presented" means.
Is there a problem with your code? Can't you just count the number?
Before the loop
numberPresent = 0;
In the loop:
if (ham_dis(j,:) < 7374)
disp('image is present');
numberPresent = numberPresent + 1;
else
disp('image not present');
end
After the loop:
percentage = 100 * numberPresent / (5*339);
3 commentaires
Image Analyst
le 28 Mar 2015
My code computes that percentage. The percentage more than 7374 is just (100-percentage).
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!