📄 radarsim.m
字号:
% hObject handle to dmin (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 dmin as text
% str2double(get(hObject,'String')) returns contents of dmin as a double
Mparam=evalin('base','Mparam');
dmin = str2double(get(hObject, 'String'));
if isnan(dmin)
set(hObject, 'String', 0);
errordlg('必须输入一个数字','错误');
end
% Save the new dmin value
Mparam.dmin = dmin;
assignin('base','Mparam',Mparam);
% --- Executes during object creation, after setting all properties.
function dmin_CreateFcn(hObject, eventdata, handles)
% hObject handle to dmin (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 dmax_Callback(hObject, eventdata, handles)
% hObject handle to dmax (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 dmax as text
% str2double(get(hObject,'String')) returns contents of dmax as a double
Mparam=evalin('base','Mparam');
dmax = str2double(get(hObject, 'String'));
if isnan(dmax)
set(hObject, 'String', 0);
errordlg('必须输入一个数字','错误');
end
% Save the new dmax value
Mparam.dmax = dmax;
assignin('base','Mparam',Mparam);
% --- Executes during object creation, after setting all properties.
function dmax_CreateFcn(hObject, eventdata, handles)
% hObject handle to dmax (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 dstep_Callback(hObject, eventdata, handles)
% hObject handle to dstep (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 dstep as text
% str2double(get(hObject,'String')) returns contents of dstep as a double
Mparam=evalin('base','Mparam');
dstep = str2double(get(hObject, 'String'));
if isnan(dstep)
set(hObject, 'String', 0);
errordlg('必须输入一个数字','错误');
end
% Save the new dstep value
Mparam.dstep = dstep;
assignin('base','Mparam',Mparam);
% --- Executes during object creation, after setting all properties.
function dstep_CreateFcn(hObject, eventdata, handles)
% hObject handle to dstep (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 hrr_Callback(hObject, eventdata, handles)
% hObject handle to hrr (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 hrr as text
% str2double(get(hObject,'String')) returns contents of hrr as a double
Mparam=evalin('base','Mparam');
hrr = str2double(get(hObject, 'String'));
if isnan(hrr)
set(hObject, 'String', 0);
errordlg('必须输入一个数字','错误');
end
% Save the new hrr value
Mparam.hrr = hrr;
assignin('base','Mparam',Mparam);
% --- Executes during object creation, after setting all properties.
function hrr_CreateFcn(hObject, eventdata, handles)
% hObject handle to hrr (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 htt_Callback(hObject, eventdata, handles)
% hObject handle to htt (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 htt as text
% str2double(get(hObject,'String')) returns contents of htt as a double
Mparam=evalin('base','Mparam');
htt = str2double(get(hObject, 'String'));
if isnan(htt)
set(hObject, 'String', 0);
errordlg('必须输入一个数字','错误');
end
% Save the new htt value
Mparam.htt = htt;
assignin('base','Mparam',Mparam);
% --- Executes during object creation, after setting all properties.
function htt_CreateFcn(hObject, eventdata, handles)
% hObject handle to htt (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 u_Callback(hObject, eventdata, handles)
% hObject handle to u (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 u as text
% str2double(get(hObject,'String')) returns contents of u as a double
Mparam=evalin('base','Mparam');
u = str2double(get(hObject, 'String'));
if isnan(u)
set(hObject, 'String', 0);
errordlg('必须输入一个数字','错误');
end
% Save the new u value
Mparam.u = u;
assignin('base','Mparam',Mparam);
% --- Executes during object creation, after setting all properties.
function u_CreateFcn(hObject, eventdata, handles)
% hObject handle to u (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 grModel.
function grModel_Callback(hObject, eventdata, handles)
% hObject handle to grModel (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in grSavePara.
function grSavePara_Callback(hObject, eventdata, handles)
% hObject handle to grSavePara (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in grImportPara.
function grImportPara_Callback(hObject, eventdata, handles)
% hObject handle to grImportPara (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in grBasicFitting.
function grBasicFitting_Callback(hObject, eventdata, handles)
% hObject handle to grBasicFitting (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 grBasicFitting
% if get(hObject,'Value')==1
toolsmenufcn(handles.figure1,'BasicFitting');
% end
% --- Executes on button press in grDataStatistics.
function grDataStatistics_Callback(hObject, eventdata, handles)
% hObject handle to grDataStatistics (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 grDataStatistics
% if get(hObject,'Value')==1
toolsmenufcn(handles.figure1,'DataStatistics');
% end
% --- Executes on button press in grHold.
function grHold_Callback(hObject, eventdata, handles)
% hObject handle to grHold (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 grHold
% ‘保持旧图’按钮的设置
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if get(hObject,'value')==1
set(gca,'NextPlot','Add');
% set(handles.UIMenuGrid,'Checked','On');
elseif get(hObject,'value')==0
set(gca,'NextPlot','Replace');
% set(handles.UIMenuGrid,'Checked','Off');
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% --- Executes on button press in checkbox4.
function checkbox4_Callback(hObject, eventdata, handles)
% hObject handle to checkbox4 (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 checkbox4
% --- Executes on button press in grGrid.
function grGrid_Callback(hObject, eventdata, handles)
% hObject handle to grGrid (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 grGrid
% ‘栅格开关’按钮的设置
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if get(hObject,'value')==1
set(gca,'XGrid','on','YGrid','on');
% set(handles.UIMenuGrid,'Checked','On');
else
set(gca,'XGrid','off','YGrid','off');
% set(handles.UIMenuGrid,'Checked','Off');
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% --- Executes on button press in checkboxSubplot.
function checkboxSubplot_Callback(hObject, eventdata, handles)
% hObject handle to checkboxSubplot (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 checkboxSubplot
Eparam=evalin('base','Eparam');
CData=evalin('base','CData');
grFreq=CData.grFreq;
grDis=CData.grDis;
viewx=Eparam.viewx;
level = Eparam.level;
% 新图
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
figure('NumberTitle','on','outerposition',get(0,'screensize'));
set(gcf,'color','w')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
switch level
case 1
case 2 % 海浪散射截面曲线。
sigemadB=CData.sigemadB;
eta=-4:0.01:4;
eta=eta';
% plot(eta,sigemadB);
plot(eta(101:700),sigemadB(101:700));%dyn
xlabel('归一化多普勒频率');ylabel('海浪散射系数(dB)');
case 3 % 环境噪声曲线(Fa)。
grATMO=CData.grATMO;
grGAL=CData.grGAL;
grMANMADE=CData.grMANMADE;
grNa=CData.grNa;
grATMO2=grATMO+204;
grGAL2=grGAL+204;
grMANMADE2=grMANMADE+204;
grNa2=grNa+204;
if viewx=='fx'
% rows=size(grFreq,1);
% grNa=grNa*ones(rows,1);
semilogx(grFreq,grATMO2,'--xm',grFreq,grGAL2,'-.*c',grFreq,grMANMADE2,':oG',grFreq,grNa2,'-b.');
% semilogx(grFreq,grATMO2,'--xb',grFreq,grGAL2,'-.*R',grFreq,grMANMADE2,':oG',grFreq,grNa2,'-+k');
xlabel('频率(MHz)');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -