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

📄 planar_array_gui.m

📁 matlab的雷达相关程序
💻 M
📖 第 1 页 / 共 2 页
字号:










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















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












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









% --- Executes on button press in PlotButton.function PlotButton_Callback(hObject, eventdata, handles)% hObject    handle to PlotButton (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)
Nx = str2num(get(handles.Nx, 'String')) ;
Ny = str2num(get(handles.Ny, 'String')) ;
Ncirc = str2num(get(handles.Ncirc, 'String')) ;
dolxr = str2num(get(handles.dolxr, 'String')) ;
dolyr = str2num(get(handles.dolyr, 'String')) ;
theta0 = str2num(get(handles.theta0, 'String')) ;
phi0 = str2num(get(handles.phi0, 'String')) ;
nbits = str2num(get(handles.nbits, 'String')) ;



win_type = get(handles.winlist,'Value') ;
switch win_type
   case 1 
       win = ones(Nx,1)*ones(Ny,1)';
   case 2
       win = hamming(Nx)*hamming(Ny)' ;
   case 3
       win = hanning(Nx)*hanning(Ny)' ;
   case 4
        win = kaiser(Nx,pi)*kaiser(Ny,pi)' ;
   case 5
      win = blackman(Nx)*blackman(Ny)' ;
end       


win_type = get(handles.winlist,'Value') ;
switch win_type
   case 1 
       wincirc = ones(Ncirc,1)*ones(Ncirc,1)';
   case 2
       wincirc = hamming(Ncirc)*hamming(Ncirc)' ;
   case 3
       wincirc = hanning(Ncirc)*hanning(Ncirc)' ;
   case 4
      wincirc = kaiser(Ncirc,pi)*kaiser(Ncirc,pi)' ;
   case 5
      wincirc = blackman(Ncirc)*blackman(Ncirc)' ;
end      



planar_array_gui_type = get(handles.arraylist,'Value') ;
switch planar_array_gui_type
   case 1
      [pattern] = rect_planar_array_gui(Nx, Ny, dolxr, dolyr, theta0, phi0, 1, win, nbits);
   case 2
      [pattern,amn] = circ_planar_array_gui(Ncirc, dolxr, dolyr , theta0, phi0 , 1 ,wincirc, nbits);      
end



% --- Executes on button press in ExitButton.function ExitButton_Callback(hObject, eventdata, handles)% hObject    handle to ExitButton (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)
close all
clear all




% --- Executes during object creation, after setting all properties.function winlist_CreateFcn(hObject, eventdata, handles)% hObject    handle to winlist (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 winlist.function winlist_Callback(hObject, eventdata, handles)% hObject    handle to winlist (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 winlist contents as cell planar_array_gui%        contents{get(hObject,'Value')} returns selected item from winlist






% --- Executes during object creation, after setting all properties.function arraylist_CreateFcn(hObject, eventdata, handles)% hObject    handle to arraylist (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 arraylist.function arraylist_Callback(hObject, eventdata, handles)% hObject    handle to arraylist (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 arraylist contents as cell planar_array_gui%        contents{get(hObject,'Value')} returns selected item from arraylist
planar_array_gui_type = get(handles.arraylist,'Value') ;
switch planar_array_gui_type
   case 1  % rectangular
      set(handles.Nx,'Enable','on');        
      set(handles.Ny, 'Enable','on') ;
      set(handles.Ncirc,'Enable','off');
      
  case 2  % circular      
      set(handles.Nx,'Enable','off');        
      set(handles.Ny, 'Enable','off') ;
      set(handles.Ncirc,'Enable','on');
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

⌨️ 快捷键说明

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