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