?? radarsimulation.m
字號:
% --- Executes on button press in useMTI.
function useMTI_Callback(hObject, eventdata, handles)
% --- 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)
set(handles.run,'value',1);
run_Callback(handles.run, eventdata, handles)
% 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
% --- Executes on button press in CFAR.
function CFAR_Callback(hObject, eventdata, handles)
if get(hObject,'value')
% using relative threshold
set(handles.Th,'min',1.1,'max',10,'value',2);
Th_Callback(handles.Th, eventdata, handles);
else
% using absolute threshold
set(handles.Th,'min',-20,'max',-1,'value',-9);
Th_Callback(handles.Th, eventdata, handles);
end
% --- Executes on selection change in nMountains.
function nMountains_Callback(hObject, eventdata, handles)
% hObject handle to nMountains (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 nMountains contents as cell array
% contents{get(hObject,'Value')} returns selected item from nMountains
% --- Executes during object creation, after setting all properties.
function nMountains_CreateFcn(hObject, eventdata, handles)
% hObject handle to nMountains (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 selection change in stagger.
function stagger_Callback(hObject, eventdata, handles)
% hObject handle to stagger (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 stagger contents as cell array
% contents{get(hObject,'Value')} returns selected item from stagger
% --- Executes during object creation, after setting all properties.
function stagger_CreateFcn(hObject, eventdata, handles)
% hObject handle to stagger (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 button press in playSound.
function playSound_Callback(hObject, eventdata, handles)
% hObject handle to playSound (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 playSound
% --- Executes on button press in soundOn.
function soundOn_Callback(hObject, eventdata, handles)
val = get(hObject,'value');
if val
field = 'soundOnIcon';
else
field = 'soundOffIcon';
end
icon = getappdata(hObject,field);
set(hObject,'units','pixels');
pos = get(hObject,'position');
set(hObject,'units','normalized');
icon = imresize( icon,[pos(4) pos(3)] );
set( hObject,'cdata',icon );
% hObject handle to soundOn (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 soundOn
% --- Executes during object creation, after setting all properties.
function soundOn_CreateFcn(hObject, eventdata, handles)
if exist('soundOn.jpg','file') & exist('soundOff.jpg','file');
% both icon files exist
soundOnIcon = imread('soundOn.jpg');
soundOffIcon = imread('soundOff.jpg');
setappdata(hObject,'soundOnIcon',soundOnIcon);
setappdata(hObject,'soundOffIcon',soundOffIcon);
set(hObject,'cdata',soundOffIcon, 'value',0);
soundOn_Callback(hObject, eventdata, handles)
else
set(hObject,'enable','off');
end
% hObject handle to soundOn (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% --- Executes on button press in scopeDisplay.
function scopeDisplay_Callback(hObject, eventdata, handles)
val = get(hObject,'value');
if val
field = 'scopeOnIcon';
else
field = 'scopeOffIcon';
end
icon = getappdata(hObject,field);
set(hObject,'units','pixels');
pos = get(hObject,'position');
set(hObject,'units','normalized');
icon = imresize( icon,[pos(4) pos(3)] );
set( hObject,'cdata',icon );
% hObject handle to scopeDisplay (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 scopeDisplay
% --- Executes during object creation, after setting all properties.
function scopeDisplay_CreateFcn(hObject, eventdata, handles)
if exist('ociloscopeOn.jpg','file') & exist('ociloscopeOff.jpg','file');
% both icon files exist
scopeOnIcon = imread('ociloscopeOn.jpg');
scopeOffIcon = imread('ociloscopeOff.jpg');
setappdata(hObject,'scopeOnIcon',scopeOnIcon);
setappdata(hObject,'scopeOffIcon',scopeOffIcon);
set(hObject,'cdata',scopeOffIcon, 'value',0);
scopeDisplay_Callback(hObject, eventdata, handles)
else
set(hObject,'enable','off');
end
% hObject handle to scopeDisplay (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% --- Executes on button press in persistentDisplay.
function persistentDisplay_Callback(hObject, eventdata, handles)
% hObject handle to persistentDisplay (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 persistentDisplay
% --- Executes when figure1 is resized.
function figure1_ResizeFcn(hObject, eventdata, handles)
% hObject handle to figure1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -