⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 radarsim.m

📁 高频地波雷达完整仿真matlab程序,可以实现地波传播模块、目标回波功率模块等6个模块的仿真
💻 M
📖 第 1 页 / 共 5 页
字号:
% 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 double
Mparam=evalin('base','Mparam');

Do = str2double(get(hObject, 'String'));
if isnan(Do)
    set(hObject, 'String', 0);
    errordlg('必须输入一个数字','错误');
end

% Save the new Do value
Mparam.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');
end



function 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 double
Mparam=evalin('base','Mparam');

FMin = str2double(get(hObject, 'String'));
if isnan(FMin)
    set(hObject, 'String', 0);
    errordlg('必须输入一个数字','错误');
end

% Save the new FMin value
Mparam.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');
end



function 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 double
Mparam=evalin('base','Mparam');

FMax = str2double(get(hObject, 'String'));
if isnan(FMax)
    set(hObject, 'String', 0);
    errordlg('必须输入一个数字','错误');
end

% Save the new FMax value
Mparam.FMax = FMax;
assignin('base','Mparam',Mparam);

% --- Executes during object creation, after setting all properties.
function FMax_CreateFcn(hObject, eventdata, handles)
% hObject    handle to FMax (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 FStep_Callback(hObject, eventdata, handles)
% hObject    handle to FStep (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 FStep as text
%        str2double(get(hObject,'String')) returns contents of FStep as a double
Mparam=evalin('base','Mparam');

FStep = str2double(get(hObject, 'String'));
if isnan(FStep)
    set(hObject, 'String', 0);
    errordlg('必须输入一个数字','错误');
end

% Save the new FStep value
Mparam.FStep = FStep;
assignin('base','Mparam',Mparam);

% --- Executes during object creation, after setting all properties.
function FStep_CreateFcn(hObject, eventdata, handles)
% hObject    handle to FStep (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 R_Callback(hObject, eventdata, handles)
% hObject    handle to R (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 R as text
%        str2double(get(hObject,'String')) returns contents of R as a double


% --- Executes during object creation, after setting all properties.
function R_CreateFcn(hObject, eventdata, handles)
% hObject    handle to R (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 DeltaR_Callback(hObject, eventdata, handles)
% hObject    handle to DeltaR (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 DeltaR as text
%        str2double(get(hObject,'String')) returns contents of DeltaR as a double
Mparam=evalin('base','Mparam');

DeltaR = str2double(get(hObject, 'String'));
if isnan(DeltaR)
    set(hObject, 'String', 0);
    errordlg('必须输入一个数字','错误');
end

% Save the new DeltaR value
Mparam.DeltaR = DeltaR;
assignin('base','Mparam',Mparam);

% --- Executes during object creation, after setting all properties.
function DeltaR_CreateFcn(hObject, eventdata, handles)
% hObject    handle to DeltaR (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 ThetaB_Callback(hObject, eventdata, handles)
% hObject    handle to ThetaB (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 ThetaB as text
%        str2double(get(hObject,'String')) returns contents of ThetaB as a double
Mparam=evalin('base','Mparam');

ThetaB = str2double(get(hObject, 'String'));
if isnan(ThetaB)
    set(hObject, 'String', 0);
    errordlg('必须输入一个数字','错误');
end

% Save the new ThetaB value
Mparam.ThetaB = ThetaB;
assignin('base','Mparam',Mparam);

% --- Executes during object creation, after setting all properties.
function ThetaB_CreateFcn(hObject, eventdata, handles)
% hObject    handle to ThetaB (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 OmgB_Callback(hObject, eventdata, handles)
% hObject    handle to OmgB (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 OmgB as text
%        str2double(get(hObject,'String')) returns contents of OmgB as a double
Mparam=evalin('base','Mparam');

OmgB = str2double(get(hObject, 'String'));
if isnan(OmgB)
    set(hObject, 'String', 0);
    errordlg('必须输入一个数字','错误');
end

% Save the new OmgB value
Mparam.OmgB = OmgB;
assignin('base','Mparam',Mparam);

% --- Executes during object creation, after setting all properties.
function OmgB_CreateFcn(hObject, eventdata, handles)
% hObject    handle to OmgB (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 selection change in grSelCalc.
function grSelCalc_Callback(hObject, eventdata, handles)
% hObject    handle to grSelCalc (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns grSelCalc contents as cell array
%        contents{get(hObject,'Value')} returns selected item from grSelCalc
Eparam=evalin('base','Eparam');

selc = get(hObject,'Value');
switch selc
    case 1
        set(handles.panelEr,'Visible','off');
        set(handles.panelPr,'Visible','off');
        set(handles.panelPs,'Visible','off');
        set(handles.panelSi,'Visible','on');
        set(handles.grSelView,'Visible','off');
        set(handles.panelFreq,'Visible','off');
        set(handles.panelDis,'Visible','off');
    case 3
        set(handles.panelEr,'Visible','on');
        set(handles.panelPr,'Visible','off');
        set(handles.panelPs,'Visible','off');
        set(handles.panelSi,'Visible','off');
        set(handles.grSelView,'Visible','on');
        set(handles.panelFreq,'Visible','on');
        set(handles.panelDis,'Visible','on');
%         Eparam.calc='Er';
    case 4
        set(handles.panelEr,'Visible','off');
        set(handles.panelPr,'Visible','on');
        set(handles.panelPs,'Visible','off');
        set(handles.panelSi,'Visible','off');
        set(handles.grSelView,'Visible','on');
        set(handles.panelFreq,'Visible','on');
        set(handles.panelDis,'Visible','on');
%         Eparam.calc='Pr';
    case 5
        set(handles.panelEr,'Visible','off');
        set(handles.panelPr,'Visible','off');
        set(handles.panelPs,'Visible','on');
        set(handles.panelSi,'Visible','off');
        set(handles.grSelView,'Visible','on');
        set(handles.panelFreq,'Visible','on');
        set(handles.panelDis,'Visible','on');
%         Eparam.calc='Ps';
end
Eparam.selc=selc;
assignin('base','Eparam',Eparam);

% --- Executes during object creation, after setting all properties.
function grSelCalc_CreateFcn(hObject, eventdata, handles)
% hObject    handle to grSelCalc (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: listbox 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 selection change in grSelView.
function grSelView_Callback(hObject, eventdata, handles)
% hObject    handle to grSelView (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns grSelView contents as cell array
%        contents{get(hObject,'Value')} returns selected item from grSelView
Eparam=evalin('base','Eparam');

selc = get(hObject,'Value');
switch selc
    case 1
        set([handles.dmax,handles.dstep,handles.text34,handles.text35],'Vi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -