www.gusucode.com > phased 案例源码 matlab代码程序 > phased/StepResponseMicrophoneULAArrayExample.m
%% Step Response of Microphone ULA Array % Find the response of a ULA array of 10 omnidirectional microphones spaced % 1.5 meters apart. Set the frequency response of the microphone to the % range 20 Hz to 20 kHz and choose the signal frequency to be 100 Hz. % Using the |step| method, determine the response of each element at boresight: 0 degrees azimuth % and 0 degrees elevation. % Copyright 2015 The MathWorks, Inc. sMic = phased.OmnidirectionalMicrophoneElement(... 'FrequencyRange',[20 20e3]); Nelem = 10; sULA = phased.ULA('NumElements',Nelem,... 'ElementSpacing',1.5,... 'Element',sMic); fc = 100; ang = [0;0]; resp = step(sULA,fc,ang) %% % Plot the array directivity. Assume the speed of sound in air to be 340 % m/s. c = 340; pattern(sULA,fc,[-180:180],0,'PropagationSpeed',c,'CoordinateSystem','polar')