Bonjour,
Je suis actuellememt en stage et j'apprends a utiliser GUIDE...
Seulement bien sur j ai un souci...
En realite, pour l'instant je m'entraine mais je galere. J explique mon probleme :

J'ai cree sous GUI une interface avec 3 push buttons et un popmenu. Dessus egalement j ai une partie reservee a un graphe (plot).

Je me suis inspire des tutos mais je n'arrive pas a faire associer mes boutons avec le graphe (qui est un sinus).

Je mets mon petit code (juste pour les boutons) :
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
 
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% order of the filters
N = 5;
% cut-off normalized frequency
band = 0.5;
% ripple in the pass-band (dB)
Rpass = 0.5;
% ripple in the stop-band (dB)
Rstop = 20;
 
w = 0:pi/255:pi;
% hObject    handle to pushbutton1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
 
% Filtre de Butterworth
[num, den] = butter(N, band, 'low');
butterfilter = abs(freqz(num, den ,w));
% butterfilter(current_data);
 
 
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
 
% order of the filters
N = 5;
% cut-off normalized frequency
band = 0.5;
% ripple in the pass-band (dB)
Rpass = 0.5;
% ripple in the stop-band (dB)
Rstop = 20;
 
w = 0:pi/255:pi;
 
% hObject    handle to pushbutton2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% Filtre de Chebychev1
[num, den] = cheby1(N, Rpass, band);
cheby1filter = abs(freqz(num, den ,w));
% plot(cheby1filter)
 
 
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% order of the filters
N = 10;
% cut-off normalized frequency
band = 0.5;
% ripple in the pass-band (dB)
Rpass = 0.5;
% ripple in the stop-band (dB)
Rstop = 20;
 
w = 0:pi/255:pi;
% hObject    handle to pushbutton3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
 
% Filtre elliptique
[num, den] = ellip(N, Rpass, Rstop, band);
ellipfilter = abs(freqz(num, den ,w));
% plot(ellipfilter)
Bien evidemment vous avez compris que je veux appliquer 3 filtres simples a ce sinus mais quand je l'utilise rien ne se passe...

quelqu'un pourrait il me renseigner svp?
Merci d avance