summaryrefslogtreecommitdiff
path: root/929/CH3/EX3.4.b/Example3_4_b.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /929/CH3/EX3.4.b/Example3_4_b.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '929/CH3/EX3.4.b/Example3_4_b.sce')
-rwxr-xr-x929/CH3/EX3.4.b/Example3_4_b.sce45
1 files changed, 45 insertions, 0 deletions
diff --git a/929/CH3/EX3.4.b/Example3_4_b.sce b/929/CH3/EX3.4.b/Example3_4_b.sce
new file mode 100755
index 000000000..b48d3a660
--- /dev/null
+++ b/929/CH3/EX3.4.b/Example3_4_b.sce
@@ -0,0 +1,45 @@
+//Example 3.4(b)
+
+clear;
+
+clc;
+
+dcgaindB=20;//Gain in dB
+
+dcgain=10^(20/20);
+
+f0=10^3;
+
+//We need R2=dcgain*R1;
+
+R1approx=20*10^(3);
+
+R2approx=dcgain*R1approx;
+
+Capprox=1/(2*%pi*f0*R2approx);
+
+n=(Capprox*10^9);
+
+C=Capprox/n;
+
+R2=R2approx*n;
+
+R1=R2/dcgain;
+
+//Hs=-(R2/R1)*(1/(R2Cs+1))
+
+Hmag=1;
+
+H0=(R2/R1);
+
+f=(((H0/Hmag)^(2)-1)*(f0^2))^(1/2);
+
+s=%i*f;
+
+Hs=-(R2/R1)*(1/(R2*C*s+1));
+
+Hsph=180-(atan(f/f0)*(180/%pi));
+
+printf("The frequency at which gain drops to 0dB=%.3f kHz",f*10^(-3));
+
+printf("\nCorresponding phase=%.2f deg",Hsph); \ No newline at end of file