www.gusucode.com > phased 案例源码 matlab代码程序 > phased/ElevationPattern7x7ElementURAExample.m

    %% Elevation Pattern of 7x7-Element URA Acoustic Array
% Create a 7x7-element URA of backbaffled omnidirectional transducer
% elements operating at 2 kHz. Assume the speed of sound in water is 1500
% m/s. The elements are spaced less than one-half wavelength apart. Plot the
% array elevation directivity patterns for three different azimuth angles,
% -20, 0, and 15 degrees. The |patternElevation| method always plots the array
% pattern in polar coordinates.
%% Create the array

% Copyright 2015 The MathWorks, Inc.

sSD = phased.OmnidirectionalMicrophoneElement(...
    'FrequencyRange',[20,3000],...
    'BackBaffled',true);
fc = 1000;
c = 1500;
lam = c/fc;
sURA = phased.URA('Element',sSD,...
    'Size',[7,7],...
    'ElementSpacing',0.5*lam);
%% Display the pattern
% Display the azimuth directivity pattern at 1 GHz in polar coordinates
patternElevation(sURA,fc,[-20, 0, 15],...
    'PropagationSpeed',c,...
    'Type','directivity')
%% Display a subset of elevation angles
% You can plot a smaller range of elevation angles by setting the |Elevation|
% parameter.
patternElevation(sURA,fc,[-20, 0, 15],...
    'PropagationSpeed',c,...
    'Type','directivity',...
    'Elevation',[-45:45])