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 /1445/CH2/EX2.45 | |
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 '1445/CH2/EX2.45')
-rw-r--r-- | 1445/CH2/EX2.45/Ex2_45.sce | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/1445/CH2/EX2.45/Ex2_45.sce b/1445/CH2/EX2.45/Ex2_45.sce index 9122b5be2..06f1c14ca 100644 --- a/1445/CH2/EX2.45/Ex2_45.sce +++ b/1445/CH2/EX2.45/Ex2_45.sce @@ -1,36 +1,36 @@ //CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT //Example 45 +clc; disp("CHAPTER 2"); disp("EXAMPLE 45"); //VARIABLE INITIALIZATION -L=1.405; //inductance in Henry -r=40; //resistance in Ohms -C=20/(10^6); //capacitance in Farad -v=100; //voltage in Volts +L=1.405; //in Henry +r=40; //in Ohms +c=20/(10^6); //in Farad +v=100; //in Volts //SOLUTION -//resonant frequency f=1/2.pi.sqrt (L.C) -f0=1/(2*%pi*sqrt(L*C)); +f0=1/(2*%pi*sqrt(L*c)); disp(sprintf("The frequency at which the circuit resonates is %d Hz",f0)); I0=v/r; -disp(sprintf("The current drawn from the supply is %.1f A",I0)); +disp(sprintf("The current drawn from the supply is %f A",I0)); xl0=2*%pi*f0*L; z0=sqrt((r^2)+(xl0^2)); vl0=I0*z0; -disp(sprintf("The voltage across the coil is %.1f V",vl0)); +disp(sprintf("The voltage across the coil is %f V",vl0)); -xc0=1/(2*%pi*f0*C); -disp(sprintf("The capcitative reactance is %.1f Ω",xc0)); +xc0=1/(2*%pi*f0*c); +disp(sprintf("The capcitative reactance is %f Ω",xc0)); Q0=(2*%pi*f0*L)/r; -disp(sprintf("The quality factor is %.3f", Q0)); +disp(sprintf("The quality factor is %f", Q0)); bw=r/L; -disp(sprintf("The bandwidth is %.3f Hz",bw)); +disp(sprintf("The bandwidth is %f Hz",bw)); //END |