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일

0 개 추천

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일
편집: Soni huu 2013년 1월 26일
sorry... im newbe .. can make code if to read the data use this code;
RainData = ReadManySoniData( 'C:\matlab7\work\org\2011', '*.dat' );
In opening function, after your reading data
handles.data=RainData
guidata(hObject,handles)
In pushbutton function read your data
RainData=handles.data
handles.data=RainData
guidata(hObject,handles)
To read your data in pushb function
RainData=handles.data
????
Soni huu
Soni huu 2013년 1월 26일
ok... thanks..

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by