How to update GUI with interims results of an algorithm in real time while the algorithm is still running??!
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi mathworks community,
i have a quite simple question that i dont know how to deal with yet.
I implemented a GUI with GUIDE and run an Algorithm "heuristic.m" by pushing a PUSHBUTTON! This Algorithm produces better and better results as it converges to a better solution. I would like the user to always see the best so far solution produced by the algorithm on the GUI surface!
I tried doing so by putting the following lines in the algorithms code.
hMainGui = findobj('Tag','gui_surface') % find tag for GUI-Surface
handles=guidata(hMainGui) % Obtain handles for GUI-components
set(handles.solution_value,'string',solution_value_best_so_far) % Update of the GUI edit-textbox
Unfortunately i see that this code doesnt work while the algorithm is running!! But as soon as i stop the algorithm the corresponding values are written in the edit-textbox... Is there a possibility of getting a continous update during the runtime of the algorithm? What did i do wrong?
I am soo glad for your help!
Best regards, John
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Function Creation에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!