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.

how to plot the EM wave in matlab

Status
Not open for further replies.

eng_boody

Member level 3
Joined
Nov 27, 2011
Messages
57
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,754
hi

how to plot the EM wave in matlab ....also how to plot phasor phath vs time

thanks
 

Here is planewave:
Code:
[x,y]=meshgrid(5:0.05:15,-5:0.05:5);
lambda=1;
k=2*pi/lambda;
f=3e8/lambda;
w=2*pi*f;
t=linspace(0,60e-9,200);
%z=exp(i*k*abs(x+i*y));
z=exp(i*k*x);
for n=1:length(t)
surf(x,y,real(z*exp(-i*w*t(n))));
%view(ceil(90*n*1/length(t)),ceil(90*n*2/length(t)));
view(3)
zlim([-1.5 1.5])
xlim([min(min(x)) max(max(x))])
ylim([min(min(y)) max(max(y))])
shading interp
getframe();
end
 
  • Like
Reactions: pewang

    pewang

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top