summaryrefslogtreecommitdiff
path: root/3554/CH14/EX14.1/Ex14_1.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3554/CH14/EX14.1/Ex14_1.sce
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '3554/CH14/EX14.1/Ex14_1.sce')
-rw-r--r--3554/CH14/EX14.1/Ex14_1.sce45
1 files changed, 45 insertions, 0 deletions
diff --git a/3554/CH14/EX14.1/Ex14_1.sce b/3554/CH14/EX14.1/Ex14_1.sce
new file mode 100644
index 000000000..1e65631f7
--- /dev/null
+++ b/3554/CH14/EX14.1/Ex14_1.sce
@@ -0,0 +1,45 @@
+// Exa 14.1
+
+ clc;
+clear all;
+
+
+// Given data
+
+fa=800; // The highest frequency(Hz)
+Vp=2; //Volts
+
+
+// Solution
+disp("Let C1=0.1 micro farads")
+C1=0.1; // micro farads
+// Then Rf is given as
+Rf=1/(2*%pi*C1*10^-6*fa);// Ohms
+printf(' Calculated value of Rf = %.3f k Ohms. selecting nearest higher value of 2.2 k Ohms \n ',Rf/1000);
+
+fb=20*fa;
+R1=1/(2*%pi*C1*10^-6*fb);// Ohms
+printf('The calculated value of R1 = %.1f Ohms. Let R1=100 Ohms \n',R1);
+
+// Since R1*C1=Rf*Cf
+Cf=R1*C1*10^-6/2200;//Rf is taken as 2.2 k Ohms as stated above
+printf(' The value of Cf = %.5f micro farads. Let Cf=0.0047 micro farads \n',Cf*10^6);
+
+Rom=(1/100+1/2200)^-1;
+printf(' Rom = %.1f Ohms \n',Rom);
+
+t=0:0.1*10^-3:1.5*2.50*10^-3;
+
+Vin=Vp*sin(2*%pi*fa*t);//Input Voltage equation
+xlabel("Time(sec)");
+ylabel("Voltage(V)");
+title("Input Voltage");
+plot2d(t,Vin);
+figure(1);
+
+Vo=-2200*0.1*10^-6*Vp*2*%pi*fa*cos(2*%pi*800*t);//Output voltage equation
+xlabel("Time(sec)");
+ylabel("Voltage(V)");
+title("Output Voltage");
+plot2d(t,Vo);
+// The answers vary due to round off error