Main Content

showSpan

Show or hide angle span between two markers

Description

example

showSpan(p,id1,id2) displays the angle span between two angle markers, id1 and id2. The angle span is calculated counterclockwise.

showSpan(p,id1,id2,true) automatically reorders the angle markers such that the initial angle span is less than or equal to 180° counterclockwise.

showSpan(p,vis) sets angle span visibility by setting vis to true or false.

showSpan(p) toggles the angle span display on and off.

d = showSpan(___) returns angle span details in a structure, d using any of the previous syntaxes.

Examples

collapse all

Create a short-dipole antenna element and plot the field values at 250 MHz.

antenna = phased.ShortDipoleAntennaElement('FrequencyRange',[100,900]*1e6,...
    'AxisDirection','Y');
angs = [-180:1:180];
fc = 250.0e6;
p = pattern(antenna,250.0e6,angs,0,'CoordinateSystem','polar','Type',...
    'efield','Polarization','H');
P = polarpattern(angs,abs(p));

Add cursors to the polar plot at -30° and 30°.

addCursor(P,[-30 30]);

Show the angle span between the two angles.

showSpan(P,'C1','C2');

Input Arguments

collapse all

Polar plot, specified as a polarpattern object.

Example: polarpattern

Cursor or peak marker identifiers, specified as character vector. Adding cursors to the polar plot creates cursor marker identifiers. Adding peaks to the polar plot creates peak marker identifiers.

Example: showspan(p,'C1','C2'). Displays the angle span between cursors, C1 and C2 in polar plot, p.

Version History

Introduced in R2016a