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

📄 pantpat2.m

📁 阵列信号处理的工具箱
💻 M
字号:
function spect = pantpat2(antenna, taperType, taperParam, smplPoints, doa0, plotopt, lambda)% *****************************************************************************%   *  DBT, A Matlab Toolbox for Radar Signal Processing  *% (c) FOA 1994-2000. See the file dbtright.m for copyright notice.%% function  spect = pantpat2(antenna, taperType, taperParam, smplPoints,%   doa0, plotopt, lambda)%% Plots the antenna pattern.%% This function uses conventional beamforming to do this. I this case the% antenna pattern is the same as the electrical scan pattern.% There are two possible antenna patterns for an array antennna, either with% mechanical angle scan or electronical angle scan. The antenna patterns are% generated by the same formula:%   P(thetaMec, thetaEl) = abs(w(thetaEl)' * a(thetaMek))^2 ,% where w(thetaEl) = taper*.a(thetaEl) = a(thetaEl)*diag(taper) is the% weight vector and a(theta) is the steering vector. Depending on wich of% thetaMec and thetaEl that is beeing varied while the other is held% constant, the mechanical or the electrical pattern is generated.% The function pantpat2 generates the electrical pattern.%% NOTE: This function pantpat2 is not tested.%% Parameter:   Data type:  Description:% ----------   ----------  ------------%  spect (DoaSpecT): Output DOA-spectrum. It is a quadratic measure of the%    presence of sources in different directions.% antenna   AntDefT% taperType, taperParam    : See the function taper.% smplPoints   Vector of DoaT : Angle grid on which the pattern will%           be computed% doa0      Vector of DoaT : Pointing direction of main array and%             subarrays.% plotopt% lambda        RealScalarT     : Wavelength [m].%%  Start        : 961122 Svante Bj鰎klund (svabj).%  Latest change: $Date: 2000/10/16 15:21:15 $ $Author: svabj $.%  $Revision: 1.12 $% *****************************************************************************disp('Warning: The function pantpat2 is obsolete and will be removed. Use pantpat3 instead.')% ****************** Add missing input parameters ******************arginNo=2;if (nargin < arginNo)  taperType = [];endarginNo = arginNo +1;if (nargin < arginNo)  taperParam = [];endarginNo = arginNo +1;if (nargin < arginNo)  smplPoints = [];endarginNo = arginNo +1;if (nargin < arginNo)  doa0 = [];endarginNo = arginNo +1;if (nargin < arginNo)  plotopt = [];endarginNo = arginNo +1;if (nargin < arginNo)  lambda = [];end% ****************** Default values ******************if isempty(taperType)  taperType = 'notaper';end%ifif isempty(taperParam)  taperParam = [];end%ifif isempty(smplPoints)  smplPoints = [];end%ifif isempty(doa0)  doa0 = 0;end%ifif isempty(plotopt)  plotopt = [];end%ifif isempty(lambda)  lambda = 1;end%if% ----------------------------------------------------------------------- %% Parameters.% ----------------------------------------------------------------------- %T  = 2;        % Number of snapshots.theta = doa0(1,1);      % Target angles. The number of targets is            %  given by the number of target angles.phi   = 0;        % Target angles.SNR   = [10]';    % Signal to noise ratio in dB at each            %  antenna element!?!alpha = d2r([0])';      % Start phases of the target signals.dalpha   = d2r([0])';      % A constant phase shift between snapshots.            %  Means targets movements at constant velocity.dist=Inf*ones(size(theta));   % Distances to the sources.% ----------------------------------------------------------------------- %% Commands.% ----------------------------------------------------------------------- %%lambda = antenna.lambda;% Generate simulated received antenna signals.sig = compsim4(antenna, lambda, T, 'const', [theta, phi, SNR, alpha, dalpha, dist], 'nonoise');antennaType = antenna.antennaType;if (strcmp(antennaType,'ULA'))  beamWidth = lambda/(antenna.noElem*antenna.distElem);  smplPos = -pi/2:(beamWidth/10):pi/2;else  smplPos = asin(-1:0.005:1);end% Estimate the DOA-spectrum with conventional beamforming.spect = sdoaspc('cbf', sig, smplPos, taperType, taperParam);spect.spectrumType = 'Antenna Pattern';% Plot antenna pattern.splot2(spect)%splot2(spect,' s')

⌨️ 快捷键说明

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