www.gusucode.com > phased 案例源码 matlab代码程序 > phased/PlotElevationPattern5ElementCrossSonarArrayExample.m
%% Plot Elevation Pattern of 5-Element Cross Sonar Array % Construct a 5-element acoustic cross array (UCA) using the % ConformalArray System object. Assume the operating frequency is 4 kHz. A typical % value for the speed of sound in seawater is 1500.0 m/s. Plot the array % patterns at two different azimuth angles. % Copyright 2015 The MathWorks, Inc. %% Construct and view array N = 5; fc = 4000; c = 1500.0; lam = c/fc; x = zeros(1,N); y = [-1,0,1,0,0]*lam/2; z = [0,0,0,-1,1]*lam/2; sMic = phased.OmnidirectionalMicrophoneElement(... 'FrequencyRange',[0,10000],'BackBaffled',true); sArray = phased.ConformalArray('Element',sMic,... 'ElementPosition',[x;y;z],... 'ElementNormal',[zeros(1,N);zeros(1,N)]); viewArray(sArray) %% Plot magnitude elevation pattern fc = 4000; c = 1500.0; patternElevation(sArray,fc,[0,90],... 'PropagationSpeed',c,... 'Type','efield') %% Plot directivity elevation pattern % Plot the pattern for elevation angles between -60 and 6- degrees at 0.1 % degree resolution. patternElevation(sArray,fc,[0,90],... 'PropagationSpeed',c,... 'Type','directivity',... 'Elevation',[-60:0.1:60])