📄 radarsim2.m
字号:
grPs=CData.grPs; M = ['频率(MHz)',num2cell(grFreq');'距离(KM)',num2cell(grDis');'谱密度(DB,W)',num2cell(grPs')]'; % 数据 FillGrid(handles.spreadsheet,M); % 写入数据 case 9 % 回波信噪(干)比曲线。 grSCR=CData.grSCR; M = ['频率(MHz)',num2cell(grFreq');'距离(KM)',num2cell(grDis');'信噪比(DB)',num2cell(grSCR')]'; % 数据 FillGrid(handles.spreadsheet,M); % 写入数据 end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% guidata(hObject,handles); set(handles.spreadsheet,'AutoFit',1); % not 'true' set(handles.spreadsheet,'DisplayOfficeLogo',0); % not 'true'end% --- Executes on button press in grPlotBrowser.function grPlotBrowser_Callback(hObject, eventdata, handles)% hObject handle to grPlotBrowser (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% 关闭ActiveX控件。if isfield(handles,'spreadsheet') && ishandle(handles.spreadsheet) delete(handles.spreadsheet);endviewmenufcn(handles.figure1,'PlotBrowser');function Pt_Callback(hObject, eventdata, handles)% hObject handle to Pt (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 Pt as text% str2double(get(hObject,'String')) returns contents of Pt as a doubleMparam=evalin('base','Mparam');Pt = str2double(get(hObject, 'String'));if isnan(Pt) set(hObject, 'String', 0); errordlg('必须输入一个数字','错误');end% Save the new Pt valueMparam.Pt = Pt;assignin('base','Mparam',Mparam);% --- Executes during object creation, after setting all properties.function Pt_CreateFcn(hObject, eventdata, handles)% hObject handle to Pt (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 Dt_Callback(hObject, eventdata, handles)% hObject handle to Dt (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 Dt as text% str2double(get(hObject,'String')) returns contents of Dt as a doubleMparam=evalin('base','Mparam');Dt = str2double(get(hObject, 'String'));if isnan(Dt) set(hObject, 'String', 0); errordlg('必须输入一个数字','错误');end% Save the new Dt valueMparam.Dt = Dt;assignin('base','Mparam',Mparam);% --- Executes during object creation, after setting all properties.function Dt_CreateFcn(hObject, eventdata, handles)% hObject handle to Dt (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 Dr_Callback(hObject, eventdata, handles)% hObject handle to Dr (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 Dr as text% str2double(get(hObject,'String')) returns contents of Dr as a doubleMparam=evalin('base','Mparam');Dr = str2double(get(hObject, 'String'));if isnan(Dr) set(hObject, 'String', 0); errordlg('必须输入一个数字','错误');end% Save the new Dr valueMparam.Dr = Dr;assignin('base','Mparam',Mparam);% --- Executes during object creation, after setting all properties.function Dr_CreateFcn(hObject, eventdata, handles)% hObject handle to Dr (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 Po_Callback(hObject, eventdata, handles)% hObject handle to Po (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 Po as text% str2double(get(hObject,'String')) returns contents of Po as a doubleMparam=evalin('base','Mparam');Po = str2double(get(hObject, 'String'));if isnan(Po) set(hObject, 'String', 0); errordlg('必须输入一个数字','错误');end% Save the new Po valueMparam.Po = Po;assignin('base','Mparam',Mparam);% --- Executes during object creation, after setting all properties.function Po_CreateFcn(hObject, eventdata, handles)% hObject handle to Po (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 Gamma_Callback(hObject, eventdata, handles)% hObject handle to Gamma (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 Gamma as text% str2double(get(hObject,'String')) returns contents of Gamma as a doubleMparam=evalin('base','Mparam');Gamma = str2double(get(hObject, 'String'));if isnan(Gamma) set(hObject, 'String', 0); errordlg('必须输入一个数字','错误');end% Save the new Gamma valueMparam.Gamma = Gamma;assignin('base','Mparam',Mparam);% --- Executes during object creation, after setting all properties.function Gamma_CreateFcn(hObject, eventdata, handles)% hObject handle to Gamma (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 PrSigma_Callback(hObject, eventdata, handles)% hObject handle to PrSigma (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 PrSigma as text% str2double(get(hObject,'String')) returns contents of PrSigma as a doubleMparam=evalin('base','Mparam');PrSigma = str2double(get(hObject, 'String'));if isnan(PrSigma) set(hObject, 'String', 0); errordlg('必须输入一个数字','错误');end% Save the new PrSigma valueMparam.PrSigma = PrSigma;assignin('base','Mparam',Mparam);% --- Executes during object creation, after setting all properties.function PrSigma_CreateFcn(hObject, eventdata, handles)% hObject handle to PrSigma (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 Ls_Callback(hObject, eventdata, handles)% hObject handle to Ls (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 Ls as text% str2double(get(hObject,'String')) returns contents of Ls as a doubleMparam=evalin('base','Mparam');Ls = str2double(get(hObject, 'String'));if isnan(Ls) set(hObject, 'String', 0); errordlg('必须输入一个数字','错误');end% Save the new Ls valueMparam.Ls = Ls;assignin('base','Mparam',Mparam);% --- Executes during object creation, after setting all properties.function Ls_CreateFcn(hObject, eventdata, handles)% hObject handle to Ls (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 Do_Callback(hObject, eventdata, handles)% hObject handle to Do (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 Do as text% str2double(get(hObject,'String')) returns contents of Do as a doubleMparam=evalin('base','Mparam');Do = str2double(get(hObject, 'String'));if isnan(Do) set(hObject, 'String', 0); errordlg('必须输入一个数字','错误');end% Save the new Do valueMparam.Do = Do;assignin('base','Mparam',Mparam);% --- Executes during object creation, after setting all properties.function Do_CreateFcn(hObject, eventdata, handles)% hObject handle to Do (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 FMin_Callback(hObject, eventdata, handles)% hObject handle to FMin (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 FMin as text% str2double(get(hObject,'String')) returns contents of FMin as a doubleMparam=evalin('base','Mparam');FMin = str2double(get(hObject, 'String'));if isnan(FMin) set(hObject, 'String', 0); errordlg('必须输入一个数字','错误');end% Save the new FMin valueMparam.FMin = FMin;assignin('base','Mparam',Mparam);% --- Executes during object creation, after setting all properties.function FMin_CreateFcn(hObject, eventdata, handles)% hObject handle to FMin (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 FMax_Callback(hObject, eventdata, handles)% hObject handle to FMax (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 FMax as text% str2double(get(hObject,'String')) returns contents of FMax as a doubleMparam=evalin('base','Mparam');FMax = str2double(get(hObject, 'String'));if isnan(FMax) set(hObject, 'String', 0); errordlg('必须输入一个数字','错误');end% Save the new FMax valueMparam.FMax = FMax;assignin('base','Mparam',Mparam);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -