plotResponse
System object: phased.CustomMicrophoneElement
Namespace: phased
Plot response pattern of microphone
Syntax
plotResponse(H,FREQ)
plotResponse(H,FREQ,Name,Value)
hPlot = plotResponse(___)
Description
plotResponse( plots
the element response pattern along the azimuth cut, where the elevation
angle is 0. The operating frequency is specified in H,FREQ)FREQ.
plotResponse(
plots the element response with additional options specified by one
or more H,FREQ,Name,Value)Name,Value pair arguments.
returns handles of the lines or surface in the figure window, using
any of the input arguments in the previous syntaxes.hPlot = plotResponse(___)
Input Arguments
| Element System object™ |
| Operating frequency in Hertz specified as a scalar or 1–by-K row
vector. |
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name in quotes.
| Cut angle specified as a scalar. This argument is applicable
only when Default: | ||||||||||
| Format of the plot, using one of Default: | ||||||||||
| Set this value to Default: | ||||||||||
| Set this value to This parameter applies only when Default: | ||||||||||
| Specify the polarization options for plotting the antenna response
pattern. The allowable values are
For antennas that do not support polarization, the
only allowed value is Default: | ||||||||||
| Cut of the response. Valid values depend on
If you set | ||||||||||
| The unit of the plot. Valid values are
Default: | ||||||||||
| Azimuth angles for plotting element response, specified as a
row vector. The Default: | ||||||||||
| Elevation angles for plotting element response, specified as
a row vector. The Default: | ||||||||||
| U coordinate values for plotting element
response, specified as a row vector. The Default: | ||||||||||
| V coordinate values for plotting element
response, specified as a row vector. The Default: |
Examples
Design a cardioid microphone to operate in the frequency range between 500 and 1000 Hz.
h = phased.CustomMicrophoneElement; h.PolarPatternFrequencies = [500 1000]; h.PolarPattern = mag2db([... 0.5+0.5*cosd(h.PolarPatternAngles);... 0.6+0.4*cosd(h.PolarPatternAngles)]);
Display a polar plot of an azimuth cut of the response at 500 Hz and 1000 Hz.
fc = 500; plotResponse(h,[fc 2*fc],'RespCut','Az','Format','Polar');

Plot the directivity as a line plot for the same two frequencies.
plotResponse(h,[fc 2*fc],'RespCut','Az','Format','Line','Unit','dbi');

Plot a -cut of the response of a custom cardioid microphone that is designed to operate in the frequency range 500-1000 Hz.
Create a cardioid microphone.
h = phased.CustomMicrophoneElement; h.PolarPatternFrequencies = [500 1000]; h.PolarPattern = mag2db([... 0.5+0.5*cosd(h.PolarPatternAngles);... 0.6+0.4*cosd(h.PolarPatternAngles)]);
Plot the response.
fc = 500; plotResponse(h,fc,'Format','UV');

Plot the 3-D response of a custom cardioid microphone in space but with both the azimuth and elevation angles restricted to the range -40 to 40 degrees in 0.1 degree increments.
Create a custom microphone element with a cardioid pattern.
h = phased.CustomMicrophoneElement; h.PolarPatternFrequencies = [500 1000]; h.PolarPattern = mag2db([... 0.5+0.5*cosd(h.PolarPatternAngles);... 0.6+0.4*cosd(h.PolarPatternAngles)]);
Plot the 3-D response.
fc = 500; plotResponse(h,fc,'Format','polar','RespCut','3D',... 'Unit','mag','AzimuthAngles',[-40:0.1:40],... 'ElevationAngles',[-40:0.1:40]);

MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)