Re-bonjour ,

C'est probablement le dernier problème que je rencontre dans mon projet. Voilà, j'ai un bouton "Ouvrir" qui m'affiche une image dans mon interface. Je traite l'image pour à la fin avoir l'intensité d'un pixel de l'image. Après ça je dois stocker cette valeur et ouvrir une autre image pour faire la même chose et à la fin avoir un graphe de la variation de l'intensité du pixel. Le problème, c'est que le plot crash à chaque fois.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
function buttonOpen_Callback(hObject, event_data, handles)
 
         handles = guidata(gcbf);
 
         [FileName, PathName] = uigetfile('*.bmp','Selection file');
         handles.Image = imread(fullfile(PathName, FileName));
         [handles.H,handles.L] = size(handles.Image);
         handles.L = handles.L/3;
         handles.temps = handles.temps+1;
 
         guidata(gcbf, handles);
         imshow(handles.Image);
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
22
23
24
25
26
27
28
29
function buttontraitement_Callback(gcf, event_data, handles)
 
         handles = guidata(gcbf);
 
         if handles.N == 6
 
            temps = 0.072727272:0.072727272:0.8;
 
            subplot(3,2,1), plot(temps,handles.intensitePixel1), grid
            subplot(3,2,2), plot(temps,handles.intensitePixel2), grid
            subplot(3,2,3), plot(temps,handles.intensitePixel3), grid
            subplot(3,2,4), plot(temps,handles.intensitePixel4), grid
            subplot(3,2,5), plot(temps,handles.intensitePixel5), grid
            subplot(3,2,6), plot(temps,handles.intensitePixel6), grid
         else
 
            temps = 0.072727272:0.072727272:0.8;
 
            subplot(4,2,1), plot(temps,handles.intensitePixel1), grid
            subplot(4,2,2), plot(temps,handles.intensitePixel2), grid
            subplot(4,2,3), plot(temps,handles.intensitePixel3), grid
            subplot(4,2,4), plot(temps,handles.intensitePixel4), grid
            subplot(4,2,5), plot(temps,handles.intensitePixel5), grid
            subplot(4,2,6), plot(temps,handles.intensitePixel6), grid
            subplot(4,2,7), plot(temps,handles.intensitePixel7), grid
            subplot(4,2,8), plot(temps,handles.intensitePixel8), grid
 
end
guidata(gcbf,handles);
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
??? Error using ==> plot
Vectors must be the same lengths.
 
Error in ==> Projet_final>buttontraitement_Callback at 305
            subplot(3,2,1), plot(temps,handles.intensitePixel1), grid
 
??? Error while evaluating uicontrol Callback
Merci encore.