필터 지우기
필터 지우기

how to get output of for loop in edit box for matlab gui?

조회 수: 1 (최근 30일)
HEMANGI NALE
HEMANGI NALE 2019년 4월 25일
댓글: Walter Roberson 2019년 4월 25일
i am building gui where in one call back im using for loop and whenever i run it ,i get output in command window. instead of this i want output to get displayed in edit box whenever i'll press pushbutton. this is my code, can you please help me out.
im = imread('image5.jpg');
bw= im2bw(im,0.7);
label=bwlabel(bw);
stats=regionprops(label,'Solidity','Area');
density=[stats.Solidity];
area=[stats.Area];
high_dense_area=density>0.8;
max_area=max(area(high_dense_area));
a = max_area
if (100<a<250)
fprintf('stage 1a');
else
fprintf('stage0');
end
  댓글 수: 1
Walter Roberson
Walter Roberson 2019년 4월 25일
You have to set the String property of the edit box. If the Max property is set to 2 or more then you can use
handles.editbox7.String{end+1} = 'stage1a' ;
to append a new line there.

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

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by