Say I have 6 values of length of the antenna.How do I plot each radiation pattern corresponding to the lengths in a single polar plot?

1 次查看(过去 30 天)
%Wavelength lambda = 1; %Dipole antanna L = (1/4)*lambda; %Phase constant B = 2*pi/lambda; t = 0:0.01:2*pi; % Far-field pattern equation E = abs((cos(B*L/2*cos(t))-cos(B*L/2))./sin(t)); %subplot(3,2,1) % figure() polar(t,E) hold on
L=(1/3)*lambda; E = abs((cos(B*L/2*cos(t))-cos(B*L/2))./sin(t)); %subplot(3,2,2) % figure() polar(t,E) hold on
L=(1/2)*lambda; E = abs((cos(B*L/2*cos(t))-cos(B*L/2))./sin(t)); %subplot(3,2,3) % figure() polar(t,E) hold on
L=(1)*lambda; E = abs((cos(B*L/2*cos(t))-cos(B*L/2))./sin(t)); %subplot(3,2,4) % figure() polar(t,E) hold on
L=(3/2)*lambda; E = abs((cos(B*L/2*cos(t))-cos(B*L/2))./sin(t)); %subplot(3,2,5) % figure() polar(t,E) hold on
L=(2)*lambda; E = abs((cos(B*L/2*cos(t))-cos(B*L/2))./sin(t)); %subplot(3,2,6) % figure() polar(t,E) hold on
%I have done this but plot is horrible.

采纳的回答

David Goodmanson
David Goodmanson 2018-3-27
Hi Soumyadeep,
Do you have version 2016a or later? If so you can replace polar(t,E) with polarplot(t,E) and get the right result. It's a good idea to put 'hold off' at the end.
I think it's a nicer looking plot if you go with directivity and plot E/max(E) in each case so all the patterns peak out at 1.
I don't think that 'polar' is a function that Matlab would claim be particularly proud of. It always seemed like some kind of rush job. Polarplot is much better and addressed some serious deficiencies in polar.
But if you don't have polarplot it's still possible to do this plot. The idea is to build up a matrix of results, which is not a bad idea anyway. With many more than six plots it would be better to preallocate a matrix and fill it as you go, but with that few a number you can: separately name each of the E field results E1 through E6. Divide each by these by its max if desired, to get directivity. Then do a single plot,
polar(repmat(t,6,1)',[E1;E2;E3;E4;E5;E6]')
  1 个评论
Soumyadeep Paul
Soumyadeep Paul 2018-3-27
Thank sir for replying.Actually I am using 2012a version though it has been expired.I don't know about very much of the codes of MATLAB.If I somehow manage latest version I would try your recommended code also.Again thank you sir.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Physical and Time Unit Conversions 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by