How to display output from command window into Input Image?

조회 수: 6 (최근 30일)
nurul najmah
nurul najmah 2015년 11월 18일
답변: Walter Roberson 2015년 11월 18일
  • i have a fuzzy logic condition for the movement of robot. I used diplay('Output') for the final decision. How to insert the Output String into my Input Image? As it display in command window,i want to export it to my Input Image.
%Condition For Fuzzy Logic
if blackCountFreeRegion==0
display ('Move Forward');
a=display ('Move Forward');
elseif blackCountFreeRegion~=0 && newCol>260&& newCol<320
display ('Turn Right');
a=display ('Turn Right');
elseif blackCountFreeRegion~=0 && newCol>=0&& newCol<100
display ('Turn Left');
a=display ('Turn Left');
% elseif blackCountFreeRegion~=0;
else display ('Stop');
a=display ('Stop');
%else
end
figure(2);
subplot(221);
imshow(inputImage);
title('Motion');
hold on
d=text(a);
set(d, 'FontName', 'Arial' ,'FontWeight', 'bold', 'FontSize', 12,'Color', 'blue');
hold off

답변 (1개)

Walter Roberson
Walter Roberson 2015년 11월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by