
Error in phased.ULA pattern visualization
4 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(1 个)
Abhishek
2025-6-18
编辑:Abhishek
2025-6-19
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
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Array Geometries and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!