# matlab plot 2D polar pattern

Status
Not open for further replies.

#### ppAntenna

##### Member level 1 2d polar matlab

If I have E field and H field. How can I plot an antenna pattern?
Anyone can provide a matlab code to do this ??

#### g86

##### Full Member level 4 #### ppAntenna

##### Member level 1 polar vectors+matlab

#### rntsay

##### Member level 4 looks like good link to me!

#### rntsay

##### Member level 4 plot 2d polar matlab

my mistake, some pages are ok, but the matlab files are dead links.
let me make it up with this matlab code that should be very close to what you want (it actually defines then plots spherical harmonics)

L=2;M=1;
theta=pi*linspace(0,1,30);
phi=2*pi*linspace(0,1,60);
r=legendre(L,cos(theta),'sch');
dd=r(M+1, ;dd=abs(dd' * cos(M*phi));
X=dd.*(sin(theta)'*cos(phi));
Y=dd.*(sin(theta)'*sin(phi));
Z=dd.*(cos(theta)'*ones(size(phi)));
figure(1);clf;mesh(X,Y,Z),
axis on;axis square;axis([-1 1 -1 1 -1 1]);
colormap gray;
caxis([0 10]);

#### ppAntenna

##### Member level 1 matlab polar pattern

But I mean I have EX Ey Ez and Hx Hy Hz six component.
How can I convert those to 2D polar pattern in matlab??
:roll:

#### eirp polarpattern matlab

Hi!

You need to convert cartesian components to spherical. You can use i.e. Bahl&Bhartia&Garg&Ittipiboon: Microstrip Antenna design Handbook, matrix equation (1.25) at pp. 37.
Regards,
Eirp

#### rntsay

##### Member level 4 matlab spherical plot 2d

look at Poynting vector definition to get
(Ex,Ey,Ez,Hx,Hy,Hz) -> energy (scalar) -> power ... -> antenna pattern

#### eirp #### ataha

##### Junior Member level 2 matlab poynting vector

I need to plot a 3D pattern of an Antenna , How can I do using MATLAB

Status
Not open for further replies.