From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 608/CH42/EX42.09/42_09.sce | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 608/CH42/EX42.09/42_09.sce (limited to '608/CH42/EX42.09') diff --git a/608/CH42/EX42.09/42_09.sce b/608/CH42/EX42.09/42_09.sce new file mode 100755 index 000000000..d1dfdf9f4 --- /dev/null +++ b/608/CH42/EX42.09/42_09.sce @@ -0,0 +1,20 @@ +//Problem 42.09: The propagation coefficients of two filter networks are given by (a) r = (1.25 + i0.52) (b) r = 1.794/_-39.4° Determine for each (i) the attenuation coefficient, and (ii) the phase shift coefficient. + +//initializing the variables: +r1 = 1.25 + %i*0.52; // propagation coefficients +rr = 1.794; // propagation coefficients +thetar = -39.4; // in ddegrees + +//calculation: +//r +r2 = rr*cos(thetar*%pi/180) + %i*rr*sin(thetar*%pi/180) +//attenuation coefficient +a1 = real(r1) +a2 = real(r2) +//phase shift coefficient +b1 = imag(r1) +b2 = imag(r2) + +printf("\n\n Result \n\n") +printf("\nattenuation coefficient are for (a) is %.2f N and for (b) is %.3f N ",a1,a2) +printf("\nphase shift coefficient are for (a) is %.2f rad and for (b) is %.3f rad ",b1,b2) \ No newline at end of file -- cgit