📄 radarsim2.m
字号:
% Save the new dmin valueMparam.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');endfunction 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 doubleMparam=evalin('base','Mparam');dmax = str2double(get(hObject, 'String'));if isnan(dmax) set(hObject, 'String', 0); errordlg('必须输入一个数字','错误');end% Save the new dmax valueMparam.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');endfunction 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 doubleMparam=evalin('base','Mparam');dstep = str2double(get(hObject, 'String'));if isnan(dstep) set(hObject, 'String', 0); errordlg('必须输入一个数字','错误');end% Save the new dstep valueMparam.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');endfunction 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 doubleMparam=evalin('base','Mparam');hrr = str2double(get(hObject, 'String'));if isnan(hrr) set(hObject, 'String', 0); errordlg('必须输入一个数字','错误');end% Save the new hrr valueMparam.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');endfunction 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 doubleMparam=evalin('base','Mparam');htt = str2double(get(hObject, 'String'));if isnan(htt) set(hObject, 'String', 0); errordlg('必须输入一个数字','错误');end% Save the new htt valueMparam.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');endfunction 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 doubleMparam=evalin('base','Mparam');u = str2double(get(hObject, 'String'));if isnan(u) set(hObject, 'String', 0); errordlg('必须输入一个数字','错误');end% Save the new u valueMparam.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 checkboxSubplotEparam=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);%dyn plot(eta(101:700),sigemadB(101:700));xlabel('归一化多普勒频率');ylabel('海浪散射系数(dB)');grid 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,'--xb',grFreq,grGAL2,'-.*R',grFreq,grMANMADE2,':oG',grFreq,grNa2,'-+k'); xlabel('频率(MHz)'); ylabel('环境噪声因子'); legend('ATMO','GAL','MANMADE','OVERALL'); elseif viewx=='dx' rows=size(grDis,1); grATMO2=grATMO2*ones(rows,1); grGAL2=grGAL2*ones(rows,1); grMANMADE2=grMANMADE2*ones(rows,1); grNa2=grNa2*ones(rows,1); semilogx(grDis,grATMO2,'--xb',grDis,grGAL2,'-.*R',grDis,grMANMADE2,':oG',grDis,grNa2,'-+k'); xlabel('距离(km)'); ylabel('环境噪声系数');%%%dyn:因子-系数 legend('ATMO','GAL','MANMADE','OVERALL'); end case 4 % 环境噪声曲线(Pa)。 grATMO=CData.grATMO; grGAL=CData.grGAL; grMANMADE=CData.grMANMADE; grNa=CData.grNa; if viewx=='fx'% rows=size(grFreq,1);% grNa=grNa*ones(rows,1); semilogx(grFreq,grATMO,'--xb',grFreq,grGAL,'-.*R',grFreq,grMANMADE,':oG',grFreq,grNa,'-+k'); xlabel('频率(MHz)'); ylabel('功率谱密度(dBW)'); legend('ATMO','GAL','MANMADE','OVERALL'); elseif viewx=='dx' rows=size(grDis,1); grATMO=grATMO*ones(rows,1); grGAL=grGAL*ones(rows,1);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -