sa_fig3_17.m

来自「智能天线Matlab版源代码」· M 代码 · 共 51 行

M
51
字号
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                         %%%% ******************************************************  %%%% * Smart Antennas for Wireless Applications w/ Matlab *  %%%% ******************************************************  %%%%                                                         %%%% Chapter 3: Fig 3.17                                     %%%%                                                         %%%% Author: Frank Gross                                     %%%% McGraw-Hill, 2005                                       %%%% Date:  1/26/2005                                        %%%%                                                         %%%% This code creates Figure 3.17, a plot of the maximum    %%%%     directivity (dB) of a finite length dipole vs.      %%%%     length (L/lambda)                                   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%      %%------------------- Define Variables:-------------------------%%% u - inline fcn to creat finite length dipole rad. intensity    %% delta - negative limit of integration & integration step size  %% x - limits of integration                                      %% L - length of dipole in wavelengths                            %% den - denominator of maximum directivity equation              %% num - numerator of maximum directivity equation                %% Do - maximum directivity of finite length dipole               %%%--------------------------------------------------------------%%%----- Initialize variables -----%U = inline('((cos(pi*ll*cos(x))-cos(pi*ll))./sin(x)).^2.*sin(x)');delta = .01;   x = delta:delta:pi;%----- Create for loop to compute Do -----%for i = 1:120    ll = i/40;    L(i) = ll;    den = trapz(x,U(ll,x));    num = 2*max(((cos(pi*ll*cos(x))-cos(pi*ll))./sin(x)).^2);    temp2 = num/den;    Do(i) = temp2;end%----- Plot Results -----%figureplot(L,10*log10(Do),'k'), grid ontitle('\bfFigure 3.17: Maximum Directivity of Finite Length Dipole')xlabel('L/\lambda')ylabel('D_o  (dB)')

⌨️ 快捷键说明

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