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.

cant see the wave travveling at the right direction

Status
Not open for further replies.

yefj

Advanced Member level 4
Joined
Sep 12, 2019
Messages
1,087
Helped
1
Reputation
2
Reaction score
3
Trophy points
38
Activity points
6,469
Hello , i am trying to control the direction of the wave traveling as shown in the code bellow.
When i put 45 degrees in theta_in_rad=45 i get the good photo shown bellow.
but the i put 90 degrees it stays diagonal instead being traveling rottated 90 degrees.
i am plotting the real part of the field to understand how it propagates
1.why we need to use the real part to see the direction of propogation?
2.why 90 degrees doesnt work for my code?
Thanks.

1667847534442.png


Code:
clc
clear all
f=6;
lambda=300/6;
theta_in_rad=45;
theta_out_rad=70/180*pi;
x=linspace(-15*lambda,15*lambda,1000);
y=linspace(-15*lambda,15*lambda,1000);
[xx,yy]=meshgrid(x,y);
k=2*pi/lambda;
E_i=1;
E_r=E_i*sqrt(cos(theta_in_rad)/cos(theta_out_rad))
eta=377;
D_x=1.064*lambda;
k_x=k*sin(theta_in_rad)+2*pi/D_x;
k_y=sqrt(k^2-k_x.^2);
%E_t=E_i.*exp(-j*k*xx*sin(theta_in_rad)+j*k*yy*cos(theta_in_rad))+E_r.*exp(-j*k_x*xx-j*k_y*yy);%E_z
E_t=E_i.*exp(-j*k*xx*sin(theta_in_rad)+j*k*yy*cos(theta_in_rad));%E_z

figure;
imagesc(x/lambda,y/lambda,real(E_t))
xlabel('x [\lambda]')
ylabel('y [\lambda]')
colorbar;
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top