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

📄 radarsimulation.m

📁 基于matlab GUI界面的雷达仿真代码 具有丰富的参数选项 如目标个数
💻 M
📖 第 1 页 / 共 2 页
字号:
% hObject    handle to RadarBW (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end






function samplingRate_Callback(hObject, eventdata, handles)
% hObject    handle to samplingRate (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 samplingRate as text
%        str2double(get(hObject,'String')) returns contents of samplingRate as a double


% --- Executes during object creation, after setting all properties.
function samplingRate_CreateFcn(hObject, eventdata, handles)
% hObject    handle to samplingRate (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function antenaAperture_Callback(hObject, eventdata, handles)
% hObject    handle to antenaAperture (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 antenaAperture as text
%        str2double(get(hObject,'String')) returns contents of antenaAperture as a double


% --- Executes during object creation, after setting all properties.
function antenaAperture_CreateFcn(hObject, eventdata, handles)
% hObject    handle to antenaAperture (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function antenaMode_Callback(hObject, eventdata, handles)
% hObject    handle to antenaMode (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 antenaMode as text
%        str2double(get(hObject,'String')) returns contents of antenaMode as a double


% --- Executes during object creation, after setting all properties.
function antenaMode_CreateFcn(hObject, eventdata, handles)
% hObject    handle to antenaMode (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end


function edit9_CreateFcn(hObject, eventdata, handles)


% --- Executes on button press in reset.
function reset_Callback(hObject, eventdata, handles)
    set(handles.run,'value',0);
    set(handles.run,'string','Start');
    h = findobj(handles.radarDisplay,'type','line');
    delete(h);
    h = findobj(handles.radarDisplay,'type','text');
    delete(h);
    handles.mountains = [];
    guidata(hObject,handles);
    handleRadarControlls(handles,'on');
    set(handles.nTargets,'enable','on');
    set(handles.RCS,'enable','on');
    ind = get(handles.backgrundColor,'value');
    color = zeros(1,3);
    color(ind+1) = 0.502;
    set(handles.radarDisplay,'color',color);
    set(gca,'xlim',[-100 100]*1e3, 'ylim', [-100 100]*1e3);    
    grid on;
    
    plotDistLines(handles.radarDisplay,10);
    
% 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)



function nTargets_Callback(hObject, eventdata, handles)
% hObject    handle to nTargets (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 nTargets as text
%        str2double(get(hObject,'String')) returns contents of nTargets as a double


% --- Executes during object creation, after setting all properties.
function nTargets_CreateFcn(hObject, eventdata, handles)
% hObject    handle to nTargets (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end


% --- Executes on slider movement.
function targetsManuver_Callback(hObject, eventdata, handles)
% hObject    handle to targetsManuver (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,'Value') returns position of slider
%        get(hObject,'Min') and get(hObject,'Max') to determine range of slider


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

% Hint: slider controls usually have a light gray background, change
%       'usewhitebg' to 0 to use default.  See ISPC and COMPUTER.
usewhitebg = 1;
if usewhitebg
    set(hObject,'BackgroundColor',[.9 .9 .9]);
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end


% --- Executes on selection change in RCS.
function RCS_Callback(hObject, eventdata, handles)
% hObject    handle to RCS (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 RCS contents as cell array
%        contents{get(hObject,'Value')} returns selected item from RCS


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

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end


% --- Executes on button press in useMatchFilter.
function useMatchFilter_Callback(hObject, eventdata, handles)
% hObject    handle to useMatchFilter (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 useMatchFilter


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




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

% Hint: place code in OpeningFcn to populate radarDisplay




% --- Executes on button press in placeMaountins.
function placeMaountins_Callback(hObject, eventdata, handles)
    str = 'h=placeClutter(get(gcf,''userdata'')); set(gcf,''userdata'',h);';
    if get(hObject,'value')
        set(handles.run,'visible','off');
        set(hObject,'FontWeight','bold','FontSize',10);
        title(handles.radarDisplay,'click on display to place mountains');
        hold on;
        set(gcf,'userdata',handles);
        set(handles.radarDisplay,'buttondownfcn',str);
    else
        set(handles.run,'visible','on');
        hold off;
         set(hObject,'FontWeight','normal','FontSize',8);
        title(handles.radarDisplay,[]);
        h = findobj(handles.radarDisplay,'tag','mountain');
        delete(h);
        set(handles.radarDisplay,'buttondownfcn',[]);
        guidata(hObject, handles);
        
    end
        
% hObject    handle to placeMaountins (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 placeMaountins





% --- Executes on button press in useMTI.
function useMTI_Callback(hObject, eventdata, handles)
    h = [handles.MTIstr , handles.MTIsens];
    if get(hObject,'value')
        set(h,'visible','on');
    else
        set(h,'visible','off');
    end
% hObject    handle to useMTI (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 useMTI




% --- Executes on button press in displayTargets.
function displayTargets_Callback(hObject, eventdata, handles)
    displayTargets(handles,'in diffrent figure')
% hObject    handle to displayTargets (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 displayTargets





function digitizerNoiseLevel_Callback(hObject, eventdata, handles)
% hObject    handle to digitizerNoiseLevel (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 digitizerNoiseLevel as text
%        str2double(get(hObject,'String')) returns contents of digitizerNoiseLevel as a double


% --- Executes during object creation, after setting all properties.
function digitizerNoiseLevel_CreateFcn(hObject, eventdata, handles)
% hObject    handle to digitizerNoiseLevel (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end




% --- Executes on button press in bufferAnalyze.
function bufferAnalyze_Callback(hObject, eventdata, handles)
    runRadarSim(handles,1);
% hObject    handle to bufferAnalyze (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 waitForTarget.
function waitForTarget_Callback(hObject, eventdata, handles)
% hObject    handle to waitForTarget (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 waitForTarget




% --- Executes on selection change in backgrundColor.
function backgrundColor_Callback(hObject, eventdata, handles)
% hObject    handle to backgrundColor (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 backgrundColor contents as cell array
%        contents{get(hObject,'Value')} returns selected item from backgrundColor


% --- Executes during object creation, after setting all properties.
function backgrundColor_CreateFcn(hObject, eventdata, handles)
% hObject    handle to backgrundColor (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end




% --- Executes on selection change in RFnoise.
function RFnoise_Callback(hObject, eventdata, handles)
% hObject    handle to RFnoise (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 RFnoise contents as cell array
%        contents{get(hObject,'Value')} returns selected item from RFnoise


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

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end


⌨️ 快捷键说明

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