How to display output from command window into Input Image?

6 views (last 30 days)
  • 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

Answers (1)

Walter Roberson
Walter Roberson on 18 Nov 2015

Community Treasure Hunt

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

Start Hunting!