From: Jane on 12 Dec 2009 12:49 I have written a fairly complex gui, without using guide. It has roughly 20 edit boxes and 40 text boxes (roughly half created using uibutton function, which I downloaded from the file exchange - because I needed the latex interpreter), 7 axis and 3 buttons. The problem I'm having is that it is taking the gui an age to initialise. Are there any tips or guidelines I should be following in the creation of the gui to reduce the initialisation time? Thanks Jane
From: Matt Fig on 12 Dec 2009 14:12 Did you run the profiler on it?
From: Jane on 12 Dec 2009 15:42 "Matt Fig" <spamanon(a)yahoo.com> wrote in message <hg0pu3$cst$1(a)fred.mathworks.com>... > Did you run the profiler on it? I've never been worried about efficiency before so I've never had use to use it and therefore didn't even think about. Is the profiler snything to do with the red markers on the far right of the editor window? I'll try it later. I've just altered the code and broken the gui in the process, so I'll need to fix it first!
From: Matt Fig on 12 Dec 2009 15:50 Well if you have RED markers, that means your file has errors. If the markers are ORANGE, those are just suggestions. The profiler will tell you which parts of the code are taking up the most time. Say you call your GUI mygui. Then do this: profile on for ii = 1:10, mygui; close;end profile viewer Now look at the report, click on the mygui function, and especially look at the lines which are highlighted in red. Don't forget to turn the profiler off when you are done. Leaving it on seems to make everything run slower.
From: Jane on 12 Dec 2009 16:12 Yep, they are orange - not a great monitor. Do you know at what point the handles for objects exist? I have all the code that creates all the text boxes, axes, button etc. Immediately after which I call a function to plot data into the different axes. This doesn't work and the data is plotted into a different figure. However, when the same function is provoked by pushing a button it works fine. This function plots data into 7 different axes, so I can't modify the code as I have done previously by setting the 'createfcn' to provoke the function and get the initial data in. Do you have any suggestions?
|
Next
|
Last
Pages: 1 2 3 Prev: simulated ARMA model output Next: line scan along x direction of mesh plot |