diff options
author | prashantsinalkar | 2017-10-10 12:38:01 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:38:01 +0530 |
commit | f35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch) | |
tree | eb72842d800ac1233e9d890e020eac5fd41b0b1b /61/CH6/EX6.12 | |
parent | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (diff) | |
download | Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.gz Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.bz2 Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.zip |
updated the code
Diffstat (limited to '61/CH6/EX6.12')
-rwxr-xr-x | 61/CH6/EX6.12/ex6_12.sce | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/61/CH6/EX6.12/ex6_12.sce b/61/CH6/EX6.12/ex6_12.sce index f374cccca..c4bdb477f 100755 --- a/61/CH6/EX6.12/ex6_12.sce +++ b/61/CH6/EX6.12/ex6_12.sce @@ -1,11 +1,16 @@ -//ex6.12
-A_v1=10;
-A_v2=15;
-A_v3=20;
-A_v=A_v1*A_v2*A_v3; //overall voltage gain
-disp(A_v,'overall voltage gain')
-A_v1_dB=gain_in_decibel_voltage(A_v1);
-A_v2_dB=gain_in_decibel_voltage(A_v2);
-A_v3_dB=gain_in_decibel_voltage(A_v3);
-A_v_dB=A_v1_dB+A_v2_dB+A_v3_dB;
+//ex6.12 +clc +clear +function A_v_dB=gain_in_decibel_voltage(A_v) + A_v_dB=20*log10(A_v) +endfunction +A_v1=10; +A_v2=15; +A_v3=20; +A_v=A_v1*A_v2*A_v3; //overall voltage gain +disp(A_v,'overall voltage gain') +A_v1_dB=gain_in_decibel_voltage(A_v1); +A_v2_dB=gain_in_decibel_voltage(A_v2); +A_v3_dB=gain_in_decibel_voltage(A_v3); +A_v_dB=A_v1_dB+A_v2_dB+A_v3_dB; disp(A_v_dB,'total voltage gain in decibels')
\ No newline at end of file |