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/CH10/EX10.1 | |
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/CH10/EX10.1')
-rwxr-xr-x | 61/CH10/EX10.1/ex10_1.sce | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/61/CH10/EX10.1/ex10_1.sce b/61/CH10/EX10.1/ex10_1.sce index 34bdf2a4e..58371bc89 100755 --- a/61/CH10/EX10.1/ex10_1.sce +++ b/61/CH10/EX10.1/ex10_1.sce @@ -1,12 +1,17 @@ -//ex10.1
-//P out/P in=250;
-A_p_dB=gain_in_decibel_power(250)
-disp(A_p_dB,'Power gain when power gain is 250')
-A_p_dB=gain_in_decibel_power(100)
-disp(A_p_dB,'Power gain when power gain is 100')
-A_v_dB=gain_in_decibel_voltage(10)
-disp(A_v_dB,'Voltage gain when voltage gain is 10')
-A_v_dB=gain_in_decibel_power(0.5)
-disp(A_v_dB,'Power gain when voltage gain is 0.5')
-A_v_dB=gain_in_decibel_voltage(0.707)
-disp(A_v_dB,'Voltage gain when voltage gain is 0.707')
+function A_p_dB=gain_in_decibel_power(A_p) + A_p_dB=10*log10(A_p) +endfunction +function A_v_dB=gain_in_decibel_voltage(A_v) + A_v_dB=20*log10(A_v) +endfunction//ex10.1 +//P out/P in=250; +A_p_dB=gain_in_decibel_power(250) +disp(A_p_dB,'Power gain when power gain is 250') +A_p_dB=gain_in_decibel_power(100) +disp(A_p_dB,'Power gain when power gain is 100') +A_v_dB=gain_in_decibel_voltage(10) +disp(A_v_dB,'Voltage gain when voltage gain is 10') +A_v_dB=gain_in_decibel_power(0.5) +disp(A_v_dB,'Power gain when voltage gain is 0.5') +A_v_dB=gain_in_decibel_voltage(0.707) +disp(A_v_dB,'Voltage gain when voltage gain is 0.707')
\ No newline at end of file |