diff options
Diffstat (limited to '182')
-rwxr-xr-x | 182/CH3/EX3.3/example3_3.sce | 5 | ||||
-rwxr-xr-x | 182/CH3/EX3.4/example3_4.sce | 4 | ||||
-rwxr-xr-x | 182/CH5/EX5.6/exampke5_6.sce | 3 | ||||
-rwxr-xr-x | 182/CH8/EX8.5/example8_5.sce | 40 |
4 files changed, 25 insertions, 27 deletions
diff --git a/182/CH3/EX3.3/example3_3.sce b/182/CH3/EX3.3/example3_3.sce index 3a84519b6..468477f07 100755 --- a/182/CH3/EX3.3/example3_3.sce +++ b/182/CH3/EX3.3/example3_3.sce @@ -1,4 +1,3 @@ - //example 3-3 in page 41 clc; //Given Data @@ -9,7 +8,7 @@ IM=0.1e-3;//FSD(IM)=0.1 mA Rs=1;//shunt resistance in ohm //calculation n=2;//initialisation -while n>0.25, +while n>0.25, n=n/2; Im=IM*n; Vm=Im*Rm;// Meter voltage in volts @@ -17,4 +16,4 @@ while n>0.25, I=Im+Is;//toatal current through the ammeter I=Im+Is in ampere m=m+1; printf("(%c) current through the ammeter at %.2f FSD=%.1f mA\n",A(m),n,I*1000); -end +end
\ No newline at end of file diff --git a/182/CH3/EX3.4/example3_4.sce b/182/CH3/EX3.4/example3_4.sce index b799f4e09..e9eea1e4e 100755 --- a/182/CH3/EX3.4/example3_4.sce +++ b/182/CH3/EX3.4/example3_4.sce @@ -8,11 +8,11 @@ Rm=1000;// Coil resistance is 1 K-ohm // calculation I=10;// FSD initialisation m=0; -while I>0.1, +while I>0.1, I=I/10; Vm=Im*Rm;//voltage across the meter in volts Is=I-Im;//current through shunt resistance in ampere Rs=Vm/Is;//shunt resistance in ohm m=m+1; printf("(%c) shunt resistance value for %.1f A FSD is %f ohm\n ",A(m),I,Rs); -end +end
\ No newline at end of file diff --git a/182/CH5/EX5.6/exampke5_6.sce b/182/CH5/EX5.6/exampke5_6.sce index f0231db72..12404e51a 100755 --- a/182/CH5/EX5.6/exampke5_6.sce +++ b/182/CH5/EX5.6/exampke5_6.sce @@ -1,4 +1,3 @@ - // example 5-6 in page 133 clc; //Given data @@ -6,7 +5,7 @@ clc; // for less than 1% error count>=100 n=6; N=0; -while(N<100) +while(N<100) N=(2^n)-1;//count value if(N<100) n=n+1;//increment n and check weather N has exceeded 100 diff --git a/182/CH8/EX8.5/example8_5.sce b/182/CH8/EX8.5/example8_5.sce index 53c2a3c3d..ee9385065 100755 --- a/182/CH8/EX8.5/example8_5.sce +++ b/182/CH8/EX8.5/example8_5.sce @@ -1,20 +1,20 @@ -// to calculate the equivalent parallel capacitance and resistance
-// example 8-5 in page 204
-clc;
-//Given dATA
-R3=10e+3;// resistance R3 in ohm
-f=100;//frequency in hertz
-Cs=0.068e-6; Rs=183.8; // series capacitance in farad and resistance in ohm
-//Calculation
-Xs=1/(2*%pi*f*Cs);// series capacitive reactance in ohm
-Rp=(Rs*Rs+Xs*Xs)/Rs;//equivalent parallel resistance in ohm
-Xp=(Rs*Rs+Xs*Xs)/Xs;//equivalent parallel capacitive reactance in ohm
-Cp=1/(2*%pi*f*Xp);// equivalent capacitance in farad
-R4=C1*R3/Cp;// parallel resistance in ohm
-R1=R3*Rp/R4;// parallel resistance in ohm
-printf("Rp=%.2f M-ohm\nCp=%.3f Micro-F\nR1=%.2f M-ohm\nR4=%.1f K-ohm",Rp/10^6,Cp*10^6,R1/10^6,R4/1000);
-//result
-//Rp=2.98 M-ohm
-//Cp=0.068 Micro-F
-//R1=2.03 M-ohm
-//R4=14.7 K-ohm
\ No newline at end of file +// to calculate the equivalent parallel capacitance and resistance +// example 8-5 in page 204 +clc; +//Given dATA +R3=10e+3;// resistance R3 in ohm +f=100;//frequency in hertz +Cs=0.068e-6; Rs=183.8; // series capacitance in farad and resistance in ohm +//Calculation +Xs=1/(2*%pi*f*Cs);// series capacitive reactance in ohm +Rp=(Rs*Rs+Xs*Xs)/Rs;//equivalent parallel resistance in ohm +Xp=(Rs*Rs+Xs*Xs)/Xs;//equivalent parallel capacitive reactance in ohm +Cp=1/(2*%pi*f*Xp);// equivalent capacitance in farad +R4=Cs*R3/Cp;// parallel resistance in ohm +R1=R3*Rp/R4;// parallel resistance in ohm +printf("Rp=%.2f M-ohm\nCp=%.3f Micro-F\nR1=%.2f M-ohm\nR4=%.1f K-ohm",Rp/10^6,Cp*10^6,R1/10^6,R4/1000); +//result +//Rp=2.98 M-ohm +//Cp=0.068 Micro-F +//R1=2.03 M-ohm +//R4=14.7 K-ohm
\ No newline at end of file |