summaryrefslogtreecommitdiff
path: root/2219/CH7/EX7.18/Ex7_18.sce
blob: 5b8c13b31d66ab3d4e0881911884ce2884e61b78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// chapter 7 example 17
//-----------------------------------------------------------------------------
clc;
clear;
// Data is taken from Example 17. The beam steers towards left of the axis with all parameters remaining in Ex 17 are same
c       = 3*10^8;       // velocity of EM waves in m/s
f       = 2.5*10^9;     // operating frequency in Ghz
S       = 10*10^-2;     // inter element spacing
theta   = -10;           // steering angle 

// Calculations
lamda   = c/f          // Wavelength in m
phi     = (360*S/lamda)*sin(theta*%pi/180)
phi1    = 0*phi        // phase angle for element 1
phi2    = 1*phi        // phase angle for element 2
phi3    = 2*phi        // phase angle for element 3
phi4    = 3*phi        // phase angle for element 4
phi5    = 4*phi        // phase angle for element 5

// Output
mprintf('Phase angles for elements 1,2,3,4,5 are %d°, %d°, %d°, %d°, %d°',phi1,phi2,phi3,phi4,phi5);
//------------------------------------------------------------------------------