Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

3D pattern problem in Matlab

Status
Not open for further replies.

project.email

Member level 4
Joined
May 25, 2007
Messages
77
Helped
8
Reputation
16
Reaction score
8
Trophy points
1,288
Activity points
1,845
hi
Dear friends
How can I draw this 3D digram in Matlab please help me.
48e6a8ace4b747c09252.JPG
 

Hi
You can use mesh and surf commands:
Be sure to X,Y and Z have the same dimmensions.

The following code plot the 3D radiation pattern of an antenna:

Phi=(-180:1:180)*pi/180;
Theta=(0:180)*pi/180;
[PHI,THETA]=meshgrid(Phi,Theta);
R= VERTICAL --> This is the radiation field.
X=R.*sin(THETA).*cos(PHI);
Y=R.*sin(THETA).*sin(PHI);
Z=R.*cos(THETA);

figure();
mesh(X,Y,Z); %display
surf(X,Y,Z) %colored faces )
 

dear acrislg
thanks for your reply

I try this code but unfortunately obtain this plot:

Code:
Phi=(0:1:180)*2*pi/180; 
Theta=(0:1:180)*2*pi/180; 


[THETA,PHI]=meshgrid(Theta,Phi); 
R=sqrt(1-(sin(THETA)^2.*sin(PHI)^2)).*(sin(pi.*cos(THETA)));
X=R.*sin(THETA).*cos(PHI); 
Y=R.*sin(THETA).*sin(PHI); 
Z=R.*cos(THETA); 


figure(); 
mesh(X,Y,Z); %display 
surf(X,Y,Z) %colored faces

And it's diffrent !:cry:

332166db74be4f7ca4f7.jpg
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top