📄 main.m
字号:
% --- Executes during object creation, after setting all properties.
function fudu_CreateFcn(hObject, eventdata, handles)
% hObject handle to fudu (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function pinlv_Callback(hObject, eventdata, handles)
% hObject handle to pinlv (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 pinlv as text
% str2double(get(hObject,'String')) returns contents of pinlv as a double
% --- Executes during object creation, after setting all properties.
function pinlv_CreateFcn(hObject, eventdata, handles)
% hObject handle to pinlv (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function zkb_Callback(hObject, eventdata, handles)
% hObject handle to zkb (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 zkb as text
% str2double(get(hObject,'String')) returns contents of zkb as a double
% --- Executes during object creation, after setting all properties.
function zkb_CreateFcn(hObject, eventdata, handles)
% hObject handle to zkb (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function chux_Callback(hObject, eventdata, handles)
% hObject handle to chux (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 chux as text
% str2double(get(hObject,'String')) returns contents of chux as a double
% --- Executes during object creation, after setting all properties.
function chux_CreateFcn(hObject, eventdata, handles)
% hObject handle to chux (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function kuandu_Callback(hObject, eventdata, handles)
% hObject handle to kuandu (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 kuandu as text
% str2double(get(hObject,'String')) returns contents of kuandu as a double
% --- Executes during object creation, after setting all properties.
function kuandu_CreateFcn(hObject, eventdata, handles)
% hObject handle to kuandu (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function endt_Callback(hObject, eventdata, handles)
% hObject handle to endt (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 endt as text
% str2double(get(hObject,'String')) returns contents of endt as a double
% --- Executes during object creation, after setting all properties.
function endt_CreateFcn(hObject, eventdata, handles)
% hObject handle to endt (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function startt_Callback(hObject, eventdata, handles)
% hObject handle to startt (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 startt as text
% str2double(get(hObject,'String')) returns contents of startt as a double
% --- Executes during object creation, after setting all properties.
function startt_CreateFcn(hObject, eventdata, handles)
% hObject handle to startt (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function gonglv_Callback(hObject, eventdata, handles)
% hObject handle to gonglv (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 gonglv as text
% str2double(get(hObject,'String')) returns contents of gonglv as a double
% --- Executes during object creation, after setting all properties.
function gonglv_CreateFcn(hObject, eventdata, handles)
% hObject handle to gonglv (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in done1.
function done1_Callback(hObject, eventdata, handles)
% hObject handle to done1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global t;
global t0;
global y;
global y1;
axes(handles.axes1);
plot(t,y);
title('函数曲线');
grid on
axes(handles.axes2);
plot(t0,y1);
title('函数频谱');
grid on;
% --- Executes on button press in clear1.
function clear1_Callback(hObject, eventdata, handles)
% hObject handle to clear1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.fudu,'string','');
set(handles.SNR,'string','');
set(handles.pinlv,'string','');
set(handles.zkb,'string','');
set(handles.chux,'string','');
set(handles.kuandu,'string','');
set(handles.gonglv,'string','');
set(handles.startt,'string','');
set(handles.endt,'string','');
% --- 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 all;
% --- Executes on button press in reset.
function reset_Callback(hObject, eventdata, handles)
% hObject handle to reset (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.wp,'string','');
set(handles.ws,'string','');
set(handles.rs,'string','');
set(handles.rp,'string','');
set(handles.fudu,'string','');
set(handles.pinlv,'string','');
set(handles.zkb,'string','');
set(handles.chux,'string','');
set(handles.kuandu,'string','');
set(handles.gonglv,'string','');
set(handles.startt,'string','');
set(handles.endt,'string','');
set(handles.SNR,'string','');
close(axes(handles.axes1));
clear all;
%cla axes1
clc
% --- Executes on button press in clear2.
function clear2_Callback(hObject, eventdata, handles)
% hObject handle to clear2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.wp,'string','');
set(handles.ws,'string','');
set(handles.rs,'string','');
set(handles.rp,'string','');
% --- Executes on button press in back.
function back_Callback(hObject, eventdata, handles)
% hObject handle to back (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close main
welcome
function snr_Callback(hObject, eventdata, handles)
% hObject handle to snr (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 snr as text
% str2double(get(hObject,'String')) returns contents of snr as a double
% --- Executes during object creation, after setting all properties.
function snr_CreateFcn(hObject, eventdata, handles)
% hObject handle to snr (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function SNR_Callback(hObject, eventdata, handles)
% hObject handle to SNR (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 SNR as text
% str2double(get(hObject,'String')) returns contents of SNR as a double
% --- Executes during object creation, after setting all properties.
function SNR_CreateFcn(hObject, eventdata, handles)
% hObject handle to SNR (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -