说明文档中的Patt​ern函数的type​:gain在2023​a版本中并不支持?

说明网页中申明支持的type:gain, phase等模式在2022b和2023a中均不支持。应如何解决?
Type Quantity to plot
'directivity' | 'gain' | 'realizedgain' | 'efield' | 'power' | 'powerdb' | 'phase'
Error using phased.internal.parsePatternInputs
Expected Type to match one of these values:
'directivity', 'efield', 'power', 'powerdb'

Answers (1)

Hi xu yang,
As per my understanding,you want to plot Phase pattern of an antenna, but you are unable to do that using 2022b and 2023a versions of MATLAB.
You can plot the pattern of an antenna with phase as its ‘Type’ for which polarization must be provided. You can also plot all other modes in 20222b and 2023a that are mentioned in the documentation
I can demonstrate you with an example below.
a=patchMicrostrip;
figure;
pattern(a,5e9,'Polarization','H','Type','phase');
figure
pattern(a,5e9,'Type','efield')
figure
pattern(a,5e9,'Type','gain')
figure
pattern(a,5e9,'Type','powerdb')
For more information refer to MathWorks Documentation

3 Comments

hi Raghunathraju,
Thank you very much for your reply! I can run your example sussessfully, but it still dosen't work when the antenna array is different. For example, I used the URA antenna and its pattern can not support type of 'gain'. Similar for other antenna types, like ConformalArray. Would you kindly further help with checking this?
Thanks!
M = 18; % Number of elements on each row
N = 16; % Number of elements on each column
fc=1e9;
c = physconst('LightSpeed');
lambda = c/fc;
dy = 0.5*lambda; % Spacing between elements on each row (m)
dz = 0.5*lambda; % Spacing between elements on each column (m)
ura = phased.URA([N M],[dz dy]);
figure;viewArray(ura,'Title','Uniform Rectangular Array (URA)');
figure;pattern(ura,fc,'ShowArray',true)
figure;pattern(ura,fc,'ShowArray',true,'Type','gain')
Error using phased.internal.parsePatternInputs
Expected Type to match one of these values:

'directivity', 'efield', 'power', 'powerdb'

The input, 'gain', did not match any of the valid values.

Error in phased.internal.AbstractArray/pattern (line 190)
[fc,c,plotArgs] = phased.internal.parsePatternInputs(...
Hi xu yang,
In PhasedArray Toolbox ,'pattern' function doesn't have 'gain' property as its type,whereas you can plot gain and all other modes of pattern in Antenna toolbox.You can refer pattern for more information.
xu yang
xu yang on 30 Mar 2023
hi Raghunathraju,
Thanks! I agree with you. For the PhasedArray Toolbox, do we have any other function which can calculated the gain or the maximum gain?

Sign in to comment.

Tags

Asked:

on 20 Mar 2023

Commented:

on 30 Mar 2023

Community Treasure Hunt

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

Start Hunting!