I am comparing a set of images using a loop.
If the comparision works or not, there are messages to print. After the comparision done, how can i get that count of the messages? I tried to use count, but it is not working for me.
Thanks!

 채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 1월 2일
편집: KALYAN ACHARJYA 2019년 1월 3일

0 개 추천

As per your question seems easy, why not use the count=count+1, instead of message print .
% Say i=input image and r is processed image
count_match=0; count_not_match=0;
if i==r
count_match=count_match+1;
else
count_not_match=count_not_match+1;
end

댓글 수: 3

90Anonymous
90Anonymous 2019년 1월 3일
Printing part is important for my work. So, i can't get rid of that part.
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 1월 3일
편집: madhan ravi 2019년 1월 3일
% Say i=input image and r is processed image
count_match=0; count_not_match=0;
if i==r
disp('message_print');
count_match=count_match+1;
else
disp('message_print');
count_not_match=count_not_match+1;
end
From the above code you can access the number of print messages , just disp/ call/ access the value of count_match and count_not_match
90Anonymous
90Anonymous 2019년 1월 3일
Thank you @KALYAN ACHARJYA!!!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Function Creation에 대해 자세히 알아보기

질문:

2019년 1월 2일

댓글:

2019년 1월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by