Programming a GUI: Function Runs Slowly/Crashes MATLAB

2 次查看(过去 30 天)
Hi,
I am programming a GUI using GUIDE that reads data from a .xls file and then performs an analysis algorithm on the data.
The user should be able to do the following:
-Click on the "browse" button to find the data file. The program will read the data into a global variable and display some of it on a plot on the GUI.
-Click on the "analyze" button to run the data analysis algorithm. The program will read the global variable and run the data analysis and display the data on a second plot on the GUI.
The problem is that the data analysis algorithm seems to either crash MATLAB or execute very slowly. The raw data file is a 20000x10 array, and will crash MATLAB whenever I try to run the algorithm through the GUI. I have reduced the data file to a 4000x10 array and the algorithm does eventually complete when executed through the GUI, although it still takes much longer than it should.
I have run the exact same data analysis algorithm through the workspace with the full 20000x10 array and the function executes in a reasonable amount of time. I can't seem to figure out why the function crashes MATLAB or runs so much slower when executing through the GUI. I've attached the .m file for my GUI for reference. I am using MATLAB R2009b on my intel-based Macbook Pro, if that helps.
Thanks,
Matt

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by