📄 gui.m
字号:
% handles structure with handles and user data (see GUIDATA)
msgbox('File was created by: Zouzias Anastasios CEID University of Patras Greece','Info','warn')
% --- Executes on button press in close.
function close_Callback(hObject, eventdata, handles)
% hObject handle to close (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close;
% --- Executes during object creation, after setting all properties.
function energy1_CreateFcn(hObject, eventdata, handles)
% hObject handle to energy1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
function energy1_Callback(hObject, eventdata, handles)
% hObject handle to energy1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of energy1 as text
% str2double(get(hObject,'String')) returns contents of energy1 as a double
% --- Executes during object creation, after setting all properties.
function energy2_CreateFcn(hObject, eventdata, handles)
% hObject handle to energy2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
function energy2_Callback(hObject, eventdata, handles)
% hObject handle to energy2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of energy2 as text
% str2double(get(hObject,'String')) returns contents of energy2 as a double
% --- Executes during object creation, after setting all properties.
function energy3_CreateFcn(hObject, eventdata, handles)
% hObject handle to energy3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
function energy3_Callback(hObject, eventdata, handles)
% hObject handle to energy3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of energy3 as text
% str2double(get(hObject,'String')) returns contents of energy3 as a double
% --- Executes during object creation, after setting all properties.
function energy4_CreateFcn(hObject, eventdata, handles)
% hObject handle to energy4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
function energy4_Callback(hObject, eventdata, handles)
% hObject handle to energy4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of energy4 as text
% str2double(get(hObject,'String')) returns contents of energy4 as a double
% --- Executes during object creation, after setting all properties.
function energy5_CreateFcn(hObject, eventdata, handles)
% hObject handle to energy5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
function energy5_Callback(hObject, eventdata, handles)
% hObject handle to energy5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of energy5 as text
% str2double(get(hObject,'String')) returns contents of energy5 as a double
% --- Executes during object creation, after setting all properties.
function energy6_CreateFcn(hObject, eventdata, handles)
% hObject handle to energy6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
function energy6_Callback(hObject, eventdata, handles)
% hObject handle to energy6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of energy6 as text
% str2double(get(hObject,'String')) returns contents of energy6 as a double
% --- Executes during object creation, after setting all properties.
function energy7_CreateFcn(hObject, eventdata, handles)
% hObject handle to energy7 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
function energy7_Callback(hObject, eventdata, handles)
% hObject handle to energy7 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of energy7 as text
% str2double(get(hObject,'String')) returns contents of energy7 as a double
% --- Executes during object creation, after setting all properties.
function EditPressed_CreateFcn(hObject, eventdata, handles)
% hObject handle to EditPressed (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
function EditPressed_Callback(hObject, eventdata, handles)
% hObject handle to EditPressed (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of EditPressed as text
% str2double(get(hObject,'String')) returns contents of EditPressed as a double
% --- Executes on button press in rbsptoolnotch.
function rbsptoolnotch_Callback(hObject, eventdata, handles)
% hObject handle to rbsptoolnotch (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of rbsptoolnotch
state=get(hObject, 'Value');
if state==0,
set(hObject, 'Value', 1);
else,
set(handles.rbmynotch, 'Value', 0);
% states=ones(23, 1);states([(3:10)])=0;
% handles=activate_uicontrol(states, handles);
end
guidata(hObject, handles);
% --- Executes on button press in rbmynotch.
function rbmynotch_Callback(hObject, eventdata, handles)
% hObject handle to rbmynotch (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of rbmynotch
state=get(hObject, 'Value');
if state==0,
set(hObject, 'Value', 1);
else,
set(handles.rbsptoolnotch, 'Value', 0);
% states=ones(23, 1);states([(3:10)])=0;
% handles=activate_uicontrol(states, handles);
end
guidata(hObject, handles);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -