getNumSubarrays
Description
Examples
Steer Subarrays of NRRectangularPanelArray
Construct a 5G antenna array with panels on a 2-by-2 grid with each panel being a 4-by-4 array. Each antenna element consists of two short-dipole elements. Use each panel as a subarray. The elements are spaced 1/2 wavelength apart and the panels are spaced at 5/2 wavelengths. Plot the response of the array at 6 GHz. Assume the weights for each element within the subarray is unity.
c = physconst('LightSpeed'); fc = 6e9; lambda = c/fc; ant = phased.ShortDipoleAntennaElement; array = phased.NRRectangularPanelArray(ElementSet={ant,ant}, ... Size=[4, 4, 2, 2], ... Spacing=[0.5*lambda,0.5*lambda,5*0.5*lambda,5*0.5*lambda], ... EnablePanelSubarray=true,SubarraySteering='Custom');
Display the array pattern.
pattern(array,fc,'ElementWeights',ones(16,8));
Compute the number of elements and the number of subarrays.
getNumElements(array)
ans = 128
getNumSubarrays(array)
ans = 8
Then get the subarray positions.
getSubarrayPosition(array)
ans = 3×8
0 0 0 0 0 0 0 0
-0.0625 -0.0625 -0.0625 -0.0625 0.0625 0.0625 0.0625 0.0625
0.0625 0.0625 -0.0625 -0.0625 0.0625 0.0625 -0.0625 -0.0625
Input Arguments
array
— Panel array
phased.NRRectangularPanelArray
Phased array, specified as a phased.NRRectangularPanelArray
System object™.
Output Arguments
N
— Number of subarrays in panel array
nonnegative integer
Number of subarrays in panel array, returned as a nonnegative integer. Number of
subarrays in the panel array
when the
EnablePanelSubarray
property is set to true
.
N
is returned as 0 when the
EnablePanelSubarray
property is set to false.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced in R2023b
See Also
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)