Slow GUI Issue in Matlab 2018b/2019a

3 views (last 30 days)
I created a gui using guide in matlab 2014 which worked well, but with each succession of Matlab the gui tends to run slower. All other aspects in the current version of Matlab works well and so does the computer's operating system (macOS Mojave 10.14.5). Is there any solution for this?
  1 Comment
Adam Danz
Adam Danz on 10 Jul 2019
If you still have access to various matlab releases, you could run the profiler while accessing your GUI and compare the report between matlab releases.

Sign in to comment.

Answers (2)

Michael
Michael on 1 Aug 2019
We had a similar issue with a GUIDE developed UI that started performing slowly with input actions and callbacks after upgrades to 2018b or 2019a. The particular UI we had issues with had a number of plot axes, and the solution we found was to execute the command:
disableDefaultInteractivity(axis_handle)
for all axis handles in the figure.

Oscar Julian Gonzalez Villarreal
I am having similar problems... I am finding the GUI to be incredibly slow for what I need and I am hoping I can get some help. I tried what you said about the disable and it didn't work for me.
To test this I did a GUI with only 2 plots/axes, each one displaying only one set/line of 100 x,y data, in this case some cosinusoidal signals.... very simple stuff. I run the GUI from my .m file and access the handlers of the graphs/axes to update the data (not replotting just updating as I've read and verified that this is faster). I then put this in a timed loop where I want to keep a period of 0.04 secs (40 ms - 25 Hz), and the program completely fails on maintaining this. I put some timers to measure the execution time of the update and it is actually very slow (around 100 ms for just 2 axes, each one with 100 data points) You can replicate this by running the file "Test_GUI_cmd2.m" which uses "GUI_Test3.mlapp" where you are able to see what I am describing.
If I just comment the following lines of my .m file, the code runs as expected and perfectly maintains the 0.04 period.
% h.UIAxes.Children(1).XData=t;
% h.UIAxes.Children(1).YData=x;
% h.UIAxes_2.Children(1).XData=t;
% h.UIAxes_2.Children(1).YData=y;
On the other hand, in the code "Test_GraphData_update.m" I use a simple figure to plot the data using a similar approach by updating the data through the handlers inside the loop where I am now able to perfectly maintain my desired period. So what is an appropriate solution for this. For the record, this solution using standard figure stuff updates at about 10 ms which is about 10 times faster than the other one. I just don't get why is this massive difference?
Look forward to hearing back from anyone.

Categories

Find more on Migrate GUIDE Apps 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!