Error in phased.ULA pattern visualization

4 views (last 30 days)
andres
andres on 17 Jun 2025
Edited: Abhishek on 19 Jun 2025
I am attempting to visualize the beam pattern of a ULA in MATLAB using the pattern function, but I encounter the following error:
Error using phased.internal.parsePatternInputs
Expected a subarray with the SubarraySteering property set to 'Phase' or 'Time'.
Error in phased.internal.AbstractArray/pattern (line 190)
[fc,c,plotArgs] = phased.internal.parsePatternInputs(...
Error in ans1 (line 21)
pattern(array, fc, [-90:0.5:90], 0, 'Type', 'powerdb', ...
It that the function internally expects a subarraystering property to be defined, could someone clarify, how to make it valid?

Answers (1)

Abhishek
Abhishek on 18 Jun 2025
Edited: Abhishek on 19 Jun 2025
The error occurs because the 'pattern' function does not internally apply 'steering' unless you provide explicit steering weights. When you specify 'SteerAngle' without defining how the steering is applied (via weights), MATLAB expects the array to support subarray steering, which 'phased.ULA' does not by default.
To rectify the issue, you need to pass the steering weights explicitly to the 'pattern' function using the 'Weights' parameter.This informs the function how to steer the array, even if the array object itself does not support subarray steering.
Replace this line:
pattern(array, fc, -90:0.5:90, 0, 'Type', 'powerdb', 'SteerAngle', steer_angle);
with this:
pattern(array, fc, -90:0.5:90, 0, 'Type', 'powerdb', 'Weights', sv);
Where 'sv' is the steering vector computed using 'phased.SteeringVector'.
I tried this on MATLAB R2024b, here is what I got:
You can refer to the official documentation of MATLAB for more details: https://www.mathworks.com/help/releases/R2024b/phased/ref/phased.pattern_array.pattern.html

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!