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 --- 2210/CH7/EX7.9/7_9.sce | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 2210/CH7/EX7.9/7_9.sce (limited to '2210/CH7/EX7.9/7_9.sce') diff --git a/2210/CH7/EX7.9/7_9.sce b/2210/CH7/EX7.9/7_9.sce new file mode 100755 index 000000000..ec470372c --- /dev/null +++ b/2210/CH7/EX7.9/7_9.sce @@ -0,0 +1,27 @@ +//Chapter 7, Problem 9 +clc +funcprot(0) +// A = p2z(R,Theta) - Convert from polar to rectangular form. +// R is a matrix containing the magnitudes +// Theta is a matrix containing the phase angles (in degrees). +function [A] = p2z(R,Theta) + A = R*exp(%i*%pi*Theta/180); +endfunction + +// [R1, Theta1] = z2p(A1) - Display polar form of complex matrix. +function [R1, Theta1] = z2p(A1) + Theta1 = atan(imag(A1),real(A1))*180/%pi; + R1=sqrt(real(A1)^2+imag(A1)^2) +endfunction + +//transistor S parameter +s11=p2z(0.4,280) +s12=p2z(0.048,65) +s21=p2z(5.4,103) +s22=p2z(0.78,345) +rs=p2z(0.678,79.4) //source reflection coefficient +rl=p2z(0.89,70) //load reflection coefficient + +Rs=conj(s11+((s12*s21*rl)/(1-(s22*rl)))) +[Rsm,Rsa]=z2p(Rs) +printf("Source reflection coefficient, magnitude = %.3f \n\t\t\t\t angle = %.1f degree",Rsm,Rsa) -- cgit