summaryrefslogtreecommitdiff
path: root/2825/CH1/EX1.5/Ex1_5.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:38:01 +0530
committerprashantsinalkar2017-10-10 12:38:01 +0530
commitf35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch)
treeeb72842d800ac1233e9d890e020eac5fd41b0b1b /2825/CH1/EX1.5/Ex1_5.sce
parent7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (diff)
downloadScilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.gz
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.bz2
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.zip
updated the code
Diffstat (limited to '2825/CH1/EX1.5/Ex1_5.sce')
-rwxr-xr-x2825/CH1/EX1.5/Ex1_5.sce54
1 files changed, 27 insertions, 27 deletions
diff --git a/2825/CH1/EX1.5/Ex1_5.sce b/2825/CH1/EX1.5/Ex1_5.sce
index 085e5a2d3..101298f80 100755
--- a/2825/CH1/EX1.5/Ex1_5.sce
+++ b/2825/CH1/EX1.5/Ex1_5.sce
@@ -1,27 +1,27 @@
-//Ex1_5 Pg-45
-clc
-disp("Refer to the figure 1.55")
-disp("(a) R_L varies from 1 ohm to 10 ohm.")
-disp("Currents for two extreme values of R_L are")
-Vs=10 //supply voltage
-RL1=1 //resistance RL1
-Rs=100 //source resistance
-IL1=(Vs/(RL1+Rs))
-RL2=10
-IL2=(Vs/(RL2+Rs))
-per_var_cur=((IL1-IL2)/IL1)*100
-printf("\n Percentage variation in current = %.2f %%\n",per_var_cur)//answer in the text book took a .3 decimal round off value
-disp(" Now,load voltage for the two extreme values of R_L are")
-VL1=IL1*RL
-VL2=IL2*RL2
-per_var_vol=((VL2-VL1)/VL2)*100
-printf("\n Percentage variation in current = %.2f %%\n",per_var_vol)
-
-disp("(b) R_L varies from 1 k-ohm to 10 k-ohm (Figure 1.55(b))")
-disp("Currents for the two extreme values R_L are")
-RL11=1000
-IL11=(Vs/(RL11+Rs))
-RL22=10000
-IL22=(Vs/(RL22+Rs)) //mistake in book value
-per_var_cur11=((IL11-IL22)/IL11)*100
-printf("\n Percentage variation in current = %.2f %%\n",per_var_cur11) //mistake in book value
+//Ex1_5 Pg-45
+clc
+disp("Refer to the figure 1.55")
+disp("(a) R_L varies from 1 ohm to 10 ohm.")
+disp("Currents for two extreme values of R_L are")
+Vs=10 //supply voltage
+RL1=1 //resistance RL1
+Rs=100 //source resistance
+IL1=(Vs/(RL1+Rs))
+RL2=10
+IL2=(Vs/(RL2+Rs))
+per_var_cur=((IL1-IL2)/IL1)*100
+printf("\n Percentage variation in current = %.2f %%\n",per_var_cur)//answer in the text book took a .3 decimal round off value
+disp(" Now,load voltage for the two extreme values of R_L are")
+VL1=IL1*RL1
+VL2=IL2*RL2
+per_var_vol=((VL2-VL1)/VL2)*100
+printf("\n Percentage variation in current = %.2f %%\n",per_var_vol)
+
+disp("(b) R_L varies from 1 k-ohm to 10 k-ohm (Figure 1.55(b))")
+disp("Currents for the two extreme values R_L are")
+RL11=1000
+IL11=(Vs/(RL11+Rs))
+RL22=10000
+IL22=(Vs/(RL22+Rs)) //mistake in book value
+per_var_cur11=((IL11-IL22)/IL11)*100
+printf("\n Percentage variation in current = %.2f %%\n",per_var_cur11) //mistake in book value \ No newline at end of file