Matlab Programs
Matlab Programs
PROGRAM-1
% Theta value
theta=pi/8;
% Attenuation formulation
alpha=40*log(cos(theta));
output:
The attenuation of the rotary vane type attenuator (in dB) for theta =
0.3927 (Rads) is:
-3.1669dB
------------------------------------------------------------------------------------------------------------------------------------------
PROGRAM-2
clear all;
clc;
s11=1/2;
s12=s11;
s13=1/sqrt(2);
s21=s12;
s22=s11;
s23=-s13;
s31=s13;
s32=s23;
s33=0;
disp('The S-Matrix of E-Plane (Series) TEE is given as: ')
disp([s11 s12 s13]);
disp([s21 s22 s23]);
disp([s31 s32 s33]);
OUTPUT:
0.7071 -0.7071 0
------------------------------------------------------------------------------------------------------------------------------------------
PROGRAM-3
OUTPUT:
0.7071 -0.7071 0
------------------------------------------------------------------------------------------------------------------------------------------
PROGRAM-4
% H-plane TEE
s23=s13;
% E-plane TEE
s24=-s14;
% Isolated Ports
s34=0;
s43=0;
% Symmetric Property
s21=s12;
s31=s13;
s32=s23;
s41=s14;
s42=s24;
OUTPUT:
0 0 0.7071 0.7071
0 0 0.7071 -0.7071
0.7071 0.7071 0 0
0.7071 -0.7071 0 0
------------------------------------------------------------------------------------------------------------------------------------------
PROGRAM-5
% while the power at port (3) is zero. % Since, the powers at port (2)
and (4) combine in phase but, the powers at port (3) cancel each other
due to a path difference of “lambda/2”.
s31=0;
% Similarly, when the power is fed at a port (3), the resulting power is
% equally divided between port (2) and port (4) and power at port (1) is
% zero. For two unequal inputs at port (1), a sum of them is obtained at
% port (2) and port (4) while their difference is obtained at port (3).
s23=1/sqrt(2);
s43=s23;
s13=0;
0.7071 0 0.7071 0
0 0.7071 0 0.7071
0.7071 0 0.7071 0
------------------------------------------------------------------------------------------------------------------------------------------
PROGRAM-6
% Directivity (dB)
D = 40;
% Isolated Power
Pb=Pf*1e-4;
% Received Power in dB
PR=10*log10(Pin/Pr);
OUTPUT:
------------------------------------------------------------------------------------------------------------------------------------------