diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /2210/CH7/EX7.9 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '2210/CH7/EX7.9')
-rwxr-xr-x | 2210/CH7/EX7.9/7_9.sce | 27 |
1 files changed, 27 insertions, 0 deletions
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)
|