how to make pushbutton work fast

1 次查看(过去 30 天)
my pushbutton will process data to produce 26 different graph.. but pushbutton need +21 sec to create a graph, couse pushbutton will repeat read all data when i click.. then how to make pushbutton process the data without read all data every i click (just read data at firs click)
RainData = ReadManySoniData( 'C:\matlab7\work\org\2011', '*.dat' );
% need 21 sec to read this data
[ day_number, daily_rain ] = DailyRain( RainData, yearsh, monthnum);
%yearsh get from popupmenu1
%monthnum get from popupmenu2
plot( day_number, daily_rain )
ylabel........................
..............................

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-1-26
编辑:Azzi Abdelmalek 2013-1-26
In opening function read all your data then use guidata to save your data in handles
handles.data=data
guidata(hObject,handles)
To read your data in pushb function
Data=handles.data
  4 个评论
Soni huu
Soni huu 2013-1-26
handles.data=RainData
guidata(hObject,handles)
To read your data in pushb function
RainData=handles.data
????

请先登录,再进行评论。

更多回答(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