identify valid and invalid image
조회 수: 3 (최근 30일)
이전 댓글 표시
i execute a code and get two types of output.... one is valid and the other is invalid.... the valid output image has content content in it.... whereas the invalid image is totally black....
based on this information what can i do to display a message that the image is valid or invalid.... some condition check so that i can display the message correctly.... please can someone reply.....
댓글 수: 0
채택된 답변
Walter Roberson
2013년 1월 5일
if ~any(TheOutputImage(:))
msgdlg('Outside of a dog, a book is man''s best friend. Inside of a dog, it is too dark to read.');
else
......
end
댓글 수: 4
Walter Roberson
2013년 1월 5일
Put a breakpoint in at the "if ~any" and run your code again with something that creates an invalid image. Single-step through the code. I think you will find that the black image is not displayed by this section of code. If you continue single-stepping you will find the place that is displaying it.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!