bonjour!
je viens de lire la FAQ de mon erreur et je ne l'ai pas bien comprise.. du moin en ce qui concerne mon cas!
j'ai également lu cette discussion mais c'est pas vraiment la même chose.
pourriez-vous me dire où est exactement l'erreur dans mon code et comment régler le problème?
voila les fonctions:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 rrr=abs(double(i33)-double(sss)); %-------------------------------------------------------------------------- thresh=10; for j=1:width for k=1:height if ((rrr(k,j)>thresh)) ancienstr = get(handles.listbox1,'string'); % The string as it is now. ajouterstr = {get(handles.text1,'string')}; % The string to add to the stack. % The order of the args to cat puts the new string either on top or bottom. set(handles.listbox1,'str',{ancienstr{:},ajouterstr{:}}); % Put the new string on bottom. end end end
le code consiste à insérer dans la listbox l'heure et la date auxquelles la différence dépasse thresh.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 function timcb(hObject,eventdata,handleText) set(handleText,'string',datestr(now,'dd/mm/yyyy HH:MM:SS')) function text1_CreateFcn(hObject, eventdata, handles) monTimer = timer('TimerFcn',{@timcb hObject}, ... 'Period', 1.0, ... 'ExecutionMode','fixedRate'); start(monTimer); function listbox1_Callback(hObject, eventdata, handles) function listbox1_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end
Partager