Main Content


Custom microphone


The CustomMicrophoneElement object creates a custom microphone element.

To compute the response of the microphone element for specified directions:

  1. Define and set up your custom microphone element. See Construction.

  2. Call step to compute the response according to the properties of phased.CustomMicrophoneElement. The behavior of step is specific to each object in the toolbox.


Starting in R2016b, instead of using the step method to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For example, y = step(obj,x) and y = obj(x) perform equivalent operations.


H = phased.CustomMicrophoneElement creates a custom microphone system object, H, that models a custom microphone element.

H = phased.CustomMicrophoneElement(Name,Value) creates a custom microphone object, H, with each specified property set to the specified value. You can specify additional name-value pair arguments in any order as (Name1,Value1,...,NameN,ValueN).



Operating frequency vector

Specify the frequencies in hertz where the frequency responses of element are measured as a vector. The elements of the vector must be increasing. The microphone element has no response outside the specified frequency range.

Default: [0 1e20]


Frequency responses

Specify the frequency responses in decibels measured at the frequencies defined in the FrequencyVector property as a row vector. The length of the vector must equal the length of the frequency vector specified in the FrequencyVector property.

Default: [0 0]


Polar pattern measuring frequencies

Specify the measuring frequencies in hertz of the polar patterns as a row vector of length M. The measuring frequencies must be within the frequency range specified in the FrequencyVector property.

Default: 1e3


Polar pattern measuring angles

Specify the measuring angles in degrees of the polar patterns as a row vector of length N. The angles are measured from the central pickup axis of the microphone, and must be between –180 and 180, inclusive.

Default: [-180:180]


Polar pattern

Specify the polar patterns of the microphone element as an M-by-N matrix. M is the number of measuring frequencies specified in the PolarPatternFrequencies property. N is the number of measuring angles specified in the PolarPatternAngles property. Each row of the matrix represents the magnitude of the polar pattern (in decibels) measured at the corresponding frequency specified in the PolarPatternFrequencies property and corresponding angles specified in the PolarPatternAngles property. The pattern is assumed to be measured in the azimuth plane where the elevation angle is 0 and where the central pickup axis is assumed to be 0 degrees azimuth and 0 degrees elevation. The polar pattern is assumed to be symmetric around the central axis and therefore the microphone’s response pattern in 3-D space can be constructed from the polar pattern.

Default: An omnidirectional pattern with 0 dB response everywhere


Specific to phased.CustomMicrophoneElement Object

Compute and display beamwidth of sensor element pattern


Directivity of custom microphone element


Polarization capability


Plot custom microphone element directivity and patterns


Plot custom microphone element directivity or pattern versus azimuth


Plot custom microphone element directivity or pattern versus elevation


Plot response pattern of microphone


Output response of microphone

Common to All System Objects

Allow System object property value changes


collapse all

Create a custom cardioid microphone, and calculate the microphone response at 500, 1500, and 2000 Hz in two directions: (0,0) azimuth and elevation, and (40,50) azimuth and elevation.

sCustMic = phased.CustomMicrophoneElement;
sCustMic.PolarPatternFrequencies = [500 1000];
sCustMic.PolarPattern = mag2db([...
resp = step(sCustMic,[500 1500 2000],[0 0; 40 50]')
resp = 2×3

    1.0000    1.0000    1.0000
    0.7424    0.7939    0.7939



The total response of a custom microphone element is a combination of its frequency response and spatial response. phased.CustomMicrophoneElement calculates both responses using nearest neighbor interpolation and then multiplies them to form the total response. When the PolarPatternFrequencies property value is nonscalar, the object specifies multiple polar patterns. In this case, the interpolation uses the polar pattern that is measured closest to the specified frequency.

Extended Capabilities

Introduced in R2011a