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 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Soumyadeep Paul
el 26 de Mzo. de 2018
Comentada: Soumyadeep Paul
el 27 de Mzo. de 2018
%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.
0 comentarios
Respuesta aceptada
David Goodmanson
el 27 de Mzo. de 2018
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]')
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!