Clear Filters
Clear Filters

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

1 view (last 30 days)
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 Comments
Stephen23
Stephen23 on 18 Apr 2017
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 on 18 Apr 2017
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);

Sign in to comment.

Answers (0)

Categories

Find more on Graphics Performance in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!