Emt Matlab Report
Emt Matlab Report
Electro-Magnetic Theory
Submitted by:
Raja Abdul Wasay Minhas
Roll no:
BS-EE-53220 (34)
Date:
26-12-2018
Submitted to:
Dr. Aftab Ahmed Khattak
Task:
Task assigned is to generate E.M waves in conducting media
Solution:
In order to develop the Mat lab code, we first look at the equation that basically govern the behavior
of the electric and the magnetic field as they travel through a medium at orthogonal angles, also
known as the propagation of E.M waves.
The relations for the phase constant and the attenuation constant are given below:
And the relation for the wave impedance is given on the next page:
Code:
The code simply asks the user to input attenuation constant, phase constant and wave
impedance and then uses the data to plot an E.M wave by putting the data in the formulas for
both the electric field and the magnetic field respectively.
The code first asks the user to input attenuation constant, phase constant and wave impedance
the code then defines the axes and forms the equations for the electric field and the magnetic
field by using the above mentioned data
x = linspace(5,10,100);
y = linspace(5,10,100);
z = linspace(5,10,100);
[X, Y, Z] = meshgrid(x, y, z);
Ex = exp(alpha*Z).*sin(2*pi-beta*Z);
Ey = 0*X;
Ez = 0*X;
Bx = 0*X;
By = 1/eta.*exp(alpha*Z).*sin(2*pi-beta*Z);
Bz = 0*X;
Eplot = 0*x;
Bplot = 0*x;
The last part of the code plots the above mentioned equation and results in the formation of an E.M
wave.
results:
when the code is run the following results are obtained
The EM wave generated by the code is shown on the next page we can see the attenuation in the
magnetic and the electric field intensity as the wave travels through the conducting medium if the
medium was free space then attenuation constant would have a value of zero hence no attenuation
would be observed.
Figure 1.5 output