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/CH2/EX2.7/2_7.sce | |
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/CH2/EX2.7/2_7.sce')
-rwxr-xr-x | 2210/CH2/EX2.7/2_7.sce | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/2210/CH2/EX2.7/2_7.sce b/2210/CH2/EX2.7/2_7.sce new file mode 100755 index 000000000..bf64163cd --- /dev/null +++ b/2210/CH2/EX2.7/2_7.sce @@ -0,0 +1,11 @@ +//Chapter 2, Problem 7
+clc
+Zl=80-%i*10 //load impedance in complex form
+Z0=50 //characteristic impedance in ohm
+
+//calculation of reflection coefficient
+ref=(Zl-Z0)/(Zl+Z0)
+ref_mag={(real(ref)^2)+(imag(ref)^2)}^0.5
+ref_ang=atan(imag(ref)/real(ref))
+
+printf("Reflection coefficient is given by \n magnitude = %.2f \n angle = %.2f degree",ref_mag,ref_ang*180/%pi)
|