%---------------------------------------------------------------------------------
% This program plots the radaition pattern of a reflector antenna feeding
% with half wave dipole. The radiation pattern is given by:
%
% In E-plane (phi=0):
% E(theta) =[1+cos(theta)]*[fA - fB]
% In H-plane (phi=pi/2):
% E(theta) =[1+cos(theta)]*[fA + fB]
% Where:
% FA(psi,theta)=[1+cos(psi)]*J0[(4*pi*f/Lmda)*tan(psi/2)*sin(theta)]*tan(psi/2);
% FB(psi,theta)=[1-cos(psi)]*J2[(4*pi*f/Lmda)*tan(psi/2)*sin(theta)]*tan(psi/2);
% fA = integral[0,psi0]FA dpsi
% fB = integral[0,psi0]FB dpsi
%
% By: Prof. Dr. Hussein Ghouz
%---------------------------------------------------------------------------------
function varargout = RefPattern_gui(varargin)
% REFPATTERN_GUI M-file for RefPattern_gui.fig
% REFPATTERN_GUI, by itself, creates a new REFPATTERN_GUI or raises the existing
% singleton*.
%
% H = REFPATTERN_GUI returns the handle to a new REFPATTERN_GUI or the handle to
% the existing singleton*.
%
% REFPATTERN_GUI('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in REFPATTERN_GUI.M with the given input arguments.
%
% REFPATTERN_GUI('Property','Value',...) creates a new REFPATTERN_GUI or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before RefPattern_gui_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to RefPattern_gui_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help RefPattern_gui
% Last Modified by GUIDE v2.5 08-Jan-2012 23:15:12
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @RefPattern_gui_OpeningFcn, ...
'gui_OutputFcn', @RefPattern_gui_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before RefPattern_gui is made visible.
function RefPattern_gui_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to RefPattern_gui (see VARARGIN)
% Choose default command line output for RefPattern_gui
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes RefPattern_gui wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = RefPattern_gui_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
function edit_fo_Callback(hObject, eventdata, handles)
% hObject handle to edit_fo (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 edit_fo as text
% str2double(get(hObject,'String')) returns contents of edit_fo as a double
% --- Executes during object creation, after setting all properties.
function edit_fo_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit_fo (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 edit_f_Callback(hObject, eventdata, handles)
% hObject handle to edit_f (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 edit_f as text
% str2double(get(hObject,'String')) returns contents of edit_f as a double
% --- Executes during object creation, after setting all properties.
function edit_f_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit_f (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 edit_d_Callback(hObject, eventdata, handles)
% hObject handle to edit_d (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 edit_d as text
% str2double(get(hObject,'String')) returns contents of edit_d as a double
% --- Executes during object creation, after setting all properties.
function edit_d_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit_d (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 button press in pushbutton_plot.
function pushbutton_plot_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton_plot (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clc
Fo=str2num(get(handles.edit_fo,'string'));
f=str2num(get(handles.edit_f,'string'));
d=str2num(get(handles.edit_d,'string'));
Lmda = (3*1e+010)/(Fo*1e+09);
%-------------------- Reflector Parameters -----------------------
N=628;
psi0=2*acot(4*f/d);
%---------- Lagendre Coefficients of Integrals ---------
ab=linspace(0,psi0,2);
[w,psi]=quadrs(ab);
y=cos(psi);
t=tan(psi/2);
thet=-pi;
%----------- Radiation Pattern Calculations --------------
for JJ=1:N
theta(JJ)=thet;
c =( abs( 1 + cos(theta(JJ)) ) )^2;
z =(4*pi*f/Lmda)*sin(theta(JJ));
FA =(1 + y).*besselj(0,z*t).*t;
FB =(1 - y).*besselj(2,z*t).*t;
fA = w'*FA;
fB = w'*FB;
UE(JJ)= c*((fA-fB)^2);
UH(JJ)= c*((fA+fB)^2);
thet=thet+0.01;
end
%----------- Normalization And dB values ----------------
Uemax=max(UE);
Uhmax=max(UH);
UE=UE/Uemax;
UH=UH/Uhmax;
for JJ=1:N
if abs(UE(JJ))> 0.0
UE1(JJ)=10*log10( abs(UE(JJ)));
UE2(JJ)=10*log10( abs(UE(JJ)));
else
UE1(JJ)= -50.0;
UE2(JJ)=UE1(JJ);
end
if abs(UH(JJ))> 0.0
UH1(JJ)=10*log10( abs(UH(JJ)));
UH2(JJ)=10*log10( abs(UH(JJ)));
else
UH1(JJ)= -50.0;
UH2(JJ)=UH1(JJ);
end
end
for JJ=1
没有合适的资源?快使用搜索试试~ 我知道了~
基于Matlab模拟抛物线反射器辐射图.zip
共5个文件
m:3个
png:1个
fig:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 178 浏览量
2023-01-17
15:35:24
上传
评论
收藏 43KB ZIP 举报
温馨提示
基于Matlab模拟抛物线反射器辐射图.zip
资源推荐
资源详情
资源评论
收起资源包目录
基于Matlab模拟抛物线反射器辐射图.zip (5个子文件)
1.PNG 31KB
RefPattern_gui.m 8KB
RefPattern_gui.fig 9KB
quadrs.m 1KB
quadr.m 3KB
共 5 条
- 1
资源评论
天天Matlab科研工作室
- 粉丝: 3w+
- 资源: 7249
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功