# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

# step

System object: phased.CustomMicrophoneElement
Package: phased

Output response of microphone

## Syntax

```RESP = step(H,FREQ,ANG) ```

## Description

### Note

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.

`RESP = step(H,FREQ,ANG)` returns the microphone’s magnitude response, `RESP`, at frequencies specified in `FREQ` and directions specified in `ANG`.

### Note

The object performs an initialization the first time the `step` method is executed. This initialization locks nontunable properties (MATLAB) and input specifications, such as dimensions, complexity, and data type of the input data. If you change a nontunable property or an input specification, the System object issues an error. To change nontunable properties or inputs, you must first call the `release` method to unlock the object.

## Input Arguments

 `H` Microphone object. `FREQ` Frequencies in hertz. `FREQ` is a row vector of length L. `ANG` Directions in degrees. `ANG` can be either a 2-by-M matrix or a row vector of length M. If `ANG` is a 2-by-M matrix, each column of the matrix specifies the direction in the form [azimuth; elevation]. The azimuth angle must be between –180 and 180 degrees, inclusive. The elevation angle must be between –90 and 90 degrees, inclusive. If `ANG` is a row vector of length M, each element specifies a direction’s azimuth angle. In this case, the corresponding elevation angle is assumed to be 0.

## Output Arguments

 `RESP` Response of microphone. `RESP` is an M-by-L matrix that contains the responses of the microphone element at the M angles specified in `ANG` and the L frequencies specified in `FREQ`.

## Examples

expand all

Construct a custom cardioid microphone with an operating frequency of 500 Hz. Find the microphone response in the directions: (0,0) degrees azimuth and elevation and (40,50) degrees azimuth and elevation.

```sCustMic = phased.CustomMicrophoneElement; sCustMic.PolarPatternFrequencies = [500 1000]; sCustMic.PolarPattern = mag2db([... 0.5+0.5*cosd(sCustMic.PolarPatternAngles);... 0.6+0.4*cosd(sCustMic.PolarPatternAngles)]); fc = 700; ang = [0 0; 40 50]'; resp = step(sCustMic,fc,ang)```
```resp = 1.0000 0.7424 ```

## Algorithms

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.

## See Also

Was this topic helpful?

#### Hybrid Beamforming for Massive MIMO Phased Array Systems

Download the white paper