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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
% --- Executes on button press in Echelon.
function Echelon_Callback(hObject, eventdata, handles)
% hObject handle to Echelon (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if (get(hObject,'Value') == get(hObject,'Max'))
% Radio button is selected-take approriate action
h=findobj(gcbf,'style','radio');
set(h,'value',0);
set(hObject,'value',1);
set_param('Habitation/Choix','Value',0)
else
set_param('Habitation/Choix','Value',1)
end
% Hint: get(hObject,'Value') returns toggle state of Echelon
% --- Executes on button press in unique.
function unique_Callback(hObject, eventdata, handles)
% hObject handle to unique (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if (get(hObject,'Value') == get(hObject,'Max'))
% Radio button is selected-take approriate action
h=findobj(gcbf,'style','radio');
set(h,'value',0);
set(hObject,'value',1);
set_param('Habitation/Choix','Value',1)
else
set_param('Habitation/Choix','Value',0)
end
% Hint: get(hObject,'Value') returns toggle state of unique
% --- Executes on selection change in popupmenu1.
function popupmenu1_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns popupmenu1 contents as cell array
% contents{get(hObject,'Value')} returns selected item from popupmenu1
val = get(hObject,'Value');
switch val;
case '-15'
NewStrVal = -15;
case '-14'
NewStrVal = -14;
case '-13'
NewStrVal = -13;
case '-12'
NewStrVal = -12;
case '-11'
NewStrVal = -11;
case '-10'
NewStrVal = -10;
case '-9'
NewStrVal = -9;
case '-8'
NewStrVal = -8;
case '-7'
NewStrVal = -7;
case '-6'
NewStrVal = -6;
case '-5'
NewStrVal = -5;
case '-4'
NewStrVal = -4;
case '-3'
NewStrVal = -3;
case '-2'
NewStrVal = -2;
case '-1'
NewStrVal = -1;
case '0'
NewStrVal = 0;
case '1'
NewStrVal = 1;
case '2'
NewStrVal = 2;
case '3'
NewStrVal = 3;
case '4'
NewStrVal = 4;
case '5'
NewStrVal =5;
case '6'
NewStrVal = 6;
case '7'
NewStrVal = 7;
case '8'
NewStrVal = 8;
case '9'
NewStrVal = 9;
case '10'
NewStrVal = 10;
case '11'
NewStrVal = 11;
case '12'
NewStrVal = 12;
case '13'
NewStrVal = 13;
case '14'
NewStrVal = 14;
case '15'
NewStrVal = 15;
case '16'
NewStrVal = 16;
case '17'
NewStrVal = 17;
case '18'
NewStrVal = 18;
case '19'
NewStrVal = 19;
case '20'
NewStrVal = 20;
end
set_param('Habitation/Text','Value',NewStrVal) |