필터 지우기
필터 지우기

outputs in GUI getting update in different window rather than same window

조회 수: 1 (최근 30일)
Shravan Kumar
Shravan Kumar 2017년 4월 17일
댓글: Shravan Kumar 2017년 4월 18일
Hello, I have made a GUI to do some calculations and it works well w.r.t results. I have 7 outputs and 2 graphs. I have accordingly used the handles for both outputs and graphs. However the problem I face is, say when run the mygui.fig or .m file I will have a initial figure where I have to enter 3 inputs, and in the same window I have to get the outputs and the graphs. But whats happening is, I am getting another window in which I have all the entered input, calculated output values and graphs. The initial figure has only the inputs I entered. What I want is the output values and the graphs has to be updated in the same window. dont know if i am doing something wrong with handles. Searched a lot on net as well as some books but couldn't find an answer. Appreciate your help. Thanks in advance.
  댓글 수: 4
Stephen23
Stephen23 2017년 4월 18일
You need to use explicit graphics handles with every graphics function. For example you should use handles with plot, title, and any others that you use. Read the documentation for each function to know how to specify the Parent handle as an input.
Shravan Kumar
Shravan Kumar 2017년 4월 18일
thanks for the reference stephen. I started looking into them and getting a fair idea now. However just to start off, I deleted the axes both from fig and axes and wanted to see if the values will get updated in the same window. Because I have assigned handles to all of them and updating them at the end too. But still I am getting them in a new window rather than the initial one. pasting the code below. Also while browsing through some answers some one said that if the calculation is faster than matlab graphics this problem may occur I am looking into it now.. any suggestions from your side will be highly appreciated. thanks in advance
set(handles.batt,'string',batterycurrent);
set(handles.phase,'string',phasecurrent);
set(handles.elko,'string',elkocurrent);
set(handles.ifet,'string',fetcurrent);
set(handles.pvfet,'string',pvfetlosses);
set(handles.pvstator,'string',pvstatorlosses);
set(handles.pvptr,'string',pvptrlosses);
guidata(hObject,handles);

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by