필터 지우기
필터 지우기

How to deal with the string in GUI for multiple .m files ?

조회 수: 2 (최근 30일)
octopus_love
octopus_love 2017년 11월 27일
댓글: Walter Roberson 2017년 11월 27일
Hello, I'd like to display the 'i' circulating in 'for' loop.
The main structure is like this :
After click the run button on GUI(in Main_GUI), 'STEP1.m' and 'STEP2.m' are implemented.
(I used the 'evalin' function to execute the .m file, for example, evalin('base', 'STEP1_COPY_LE_RESULT_mod'); )
'STEP1.m' is to make the excels, and 'STEP2' is to do simulation. 'STEP2.m' has for loop.
% 'STEP2.m' file
for i = 1 : case_num
Input_num = i;
sim(slx, Input_num)
% I'd like to display the 'i' number in GUI.
% set(handles.gui_string, 'String', num2str(i));
end
but I don't know how can I do this. I used guidata, getappdata, setappdata, and so on...
Please help me. I need your help. Thanks in advance.

채택된 답변

Walter Roberson
Walter Roberson 2017년 11월 27일
set(handles.gui_string, 'String', num2str(i));
drawnow();
  댓글 수: 2
octopus_love
octopus_love 2017년 11월 27일
oh, I click the 'accept answer' button. It's my mistake. but it doesn't work.
command window tells that "'handles.gui_string' is not define".
I don't know..
Walter Roberson
Walter Roberson 2017년 11월 27일
Before this section, use
handles = guidata(gcf);

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 프로그래밍에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!