summaryrefslogtreecommitdiff
path: root/2528/CH10
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2528/CH10
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 '2528/CH10')
-rwxr-xr-x2528/CH10/EX10.1/Ex10_1.sce15
-rwxr-xr-x2528/CH10/EX10.2/Ex10_2.sce25
-rwxr-xr-x2528/CH10/EX10.3/Ex10_3.sce34
-rwxr-xr-x2528/CH10/EX10.4/Ex10_4.sce34
-rwxr-xr-x2528/CH10/EX10.5/Ex10_5.sce24
-rwxr-xr-x2528/CH10/EX10.6/Ex10_6.sce45
-rwxr-xr-x2528/CH10/EX10.7/Ex10_7.sce24
-rwxr-xr-x2528/CH10/EX10.8/Ex10_8.sce47
8 files changed, 248 insertions, 0 deletions
diff --git a/2528/CH10/EX10.1/Ex10_1.sce b/2528/CH10/EX10.1/Ex10_1.sce
new file mode 100755
index 000000000..db51c9a8a
--- /dev/null
+++ b/2528/CH10/EX10.1/Ex10_1.sce
@@ -0,0 +1,15 @@
+//chapter 10
+//Vout and lower frequency
+//page no. 354
+//Example10_1
+//Figure 10.7
+//Given
+clc;
+clear;
+t=0;
+Ri=10000; //in Ohm
+C=10^-8; //in farad
+Rf=100000; //in Ohm
+//Vout(t)=-1/(Ri*C)*int(Vi(t))dt
+Flow=1/(2*%pi*Rf*C);
+printf("\n Flow is %.0f Hz",Flow);
diff --git a/2528/CH10/EX10.2/Ex10_2.sce b/2528/CH10/EX10.2/Ex10_2.sce
new file mode 100755
index 000000000..f9cc18b25
--- /dev/null
+++ b/2528/CH10/EX10.2/Ex10_2.sce
@@ -0,0 +1,25 @@
+//chapter 10
+//Vout
+//page no. 356
+//Example10_2
+//Figure 10.7
+//Given
+clc;
+clear;
+step=0.1;
+t=0:step:10;
+disp("Answer is coming interm of t so solution is done by graph");
+//x=1;
+//f=5000;
+x0=-1.6;x1=0:0.1:10;
+Vin=sin(t);
+
+xtitle('Sin(x)','t')
+X=integrate('sin(t)','t',x0,x1);
+Ri=10000; //in Ohm
+C=10^-8; //in farad
+Rf=100000; //in Ohm
+Vout=-0.318*X;
+clf;
+plot(t,Vin,t,Vout);
+xtitle('Input(Blue) / Output(Green)','t','V');
diff --git a/2528/CH10/EX10.3/Ex10_3.sce b/2528/CH10/EX10.3/Ex10_3.sce
new file mode 100755
index 000000000..78868b48f
--- /dev/null
+++ b/2528/CH10/EX10.3/Ex10_3.sce
@@ -0,0 +1,34 @@
+//Chapter 10
+//Sketch the output Waveform
+//page no. 358
+//Example10_3
+//Figure 10.7
+//Given
+clc;
+clear;
+T0=4;
+t=-5.99:0.01:6;
+t_temp=0.01:0.01:T0/4;
+s=length(t)/length(t_temp);
+dx=[];
+x=[];
+for i=1:s
+ if modulo(i,2)==1 then
+ dx=[dx -ones(1,length(t_temp))];
+ x=[x .1*t_temp($:-1:1)];
+ else
+ dx=[dx ones(1,length(t_temp))];
+ x=[x .1*t_temp];
+ end
+end
+clf();
+subplot(1,2,2)
+plot(50*t,10*x-0.5,8)
+xtitle("Output Waveform","Microsecond","V");
+t=-30:0.01:30;
+subplot(1,2,1);
+plot('onn',10*t,[2*squarewave(2*t/(%pi),50)])
+xtitle("Input Waveform","Microsecond","V");
+
+
+
diff --git a/2528/CH10/EX10.4/Ex10_4.sce b/2528/CH10/EX10.4/Ex10_4.sce
new file mode 100755
index 000000000..5dfeace3c
--- /dev/null
+++ b/2528/CH10/EX10.4/Ex10_4.sce
@@ -0,0 +1,34 @@
+//chapter 10
+//Vout
+//page no. 359
+//Figure 10.11a
+//Given
+clc;
+clear;
+Rf=400000; //in Ohm
+C=20*10^-9; //in farad
+flow=1/(2*%pi*Rf*C);
+printf("\n Flow = %.1f Hz",flow);
+Ri=15000; //in Ohm
+//integration
+function Vin=f(t),Vin=.6,endfunction
+exact=-2.5432596188;
+I=intg(0,10^-3,f)
+
+Vout=-1*I/Ri/C;
+printf("\n Vout(t) = %.1f V",Vout);//Result
+
+//Graph
+t=(0:0.001:6);
+V=Vout*ones(1:0.001:4);
+
+for i=0.001:0.001:1-.001
+ V=[Vout*(1-i) V Vout*(1-i)]
+end
+
+V=[V zeros(5.001:0.001:6)]
+V=[2 V 0]
+clf;
+plot(t,V)
+xgrid;
+xtitle('Integrator output','$t$',"$Voltage$")
diff --git a/2528/CH10/EX10.5/Ex10_5.sce b/2528/CH10/EX10.5/Ex10_5.sce
new file mode 100755
index 000000000..87016d6c3
--- /dev/null
+++ b/2528/CH10/EX10.5/Ex10_5.sce
@@ -0,0 +1,24 @@
+//Chapter 10
+//range of Differentiation & Sketch the output Waveform
+//page no. 365
+//Example10_5
+//Figure 10.19
+//Given
+clc;
+clear;
+Ri=100; //in Ohm
+Ci=10^-8; //in farad
+Rf=5000; //in Ohm
+Cf=10^-10; //in farad
+fhf=1/(2*%pi*Rf*Cf);
+fh_in=1/(2*%pi*Ri*Ci);
+printf("\n Fhigh(f dbk)=%.0f Hz",fhf);
+printf("\n Fhigh(in)=%.0f Hz",fh_in);
+//graph is drawn taking function sin(t)
+t=[0:0.01:15];
+Vi=sin(t);
+plot(2*Vi);
+plot(diff(-1.885*100*Vi));
+xtitle("Partial Differentiator of sin(t)","t","V");
+
+xgrid;
diff --git a/2528/CH10/EX10.6/Ex10_6.sce b/2528/CH10/EX10.6/Ex10_6.sce
new file mode 100755
index 000000000..764d80ed6
--- /dev/null
+++ b/2528/CH10/EX10.6/Ex10_6.sce
@@ -0,0 +1,45 @@
+//Chapter 10
+//Sketch the output Waveform
+//page no. 368
+//Example10_6
+//Figure 10.19
+//Given
+clc;
+clear;
+Rf=5000; //in Ohm
+C=10^-8; //in farad
+
+f=4000; //in KHz
+T=1/f;
+printf("\n T = %.6f second",T);
+S=6/(125*10^-6);
+printf("\n Slope = %.0f V/S",S);
+//graph
+step=1;
+t=0:step:1;
+Vin=S*t;
+dy=diff(S*t/step); //approximate differentiation of sine function
+
+Vout=-Rf*C*dy;
+printf("\n Vou(t) = %.1f V",Vout);
+
+T0=4;
+t=-5.99:0.01:6;
+t_temp=0.01:0.01:T0/2;
+s=length(t)/length(t_temp);
+dx=[];
+x=[];
+for i=1:s
+ if modulo(i,2)==1 then
+ dx=[dx -ones(1,length(t_temp))];
+ x=[x .5*t_temp($:-1:1)];
+ else
+ dx=[dx ones(1,length(t_temp))];
+ x=[x .5*t_temp];
+ end
+end
+//figure
+
+subplot (1,1,1)
+plot(t,3-6*x,'b',t,2.4*dx,'r')
+xtitle('Input(b) and Output(r)','t',"V")
diff --git a/2528/CH10/EX10.7/Ex10_7.sce b/2528/CH10/EX10.7/Ex10_7.sce
new file mode 100755
index 000000000..75c4ef12d
--- /dev/null
+++ b/2528/CH10/EX10.7/Ex10_7.sce
@@ -0,0 +1,24 @@
+//Chapter 10
+//Sketch the output Waveform
+//page no. 370
+//Example10_7
+//Figure 10.23
+//Given
+clc;
+clear;
+f=4; //in KHz
+T=1/f;
+S=5*10^6;
+step=1;
+t=0:step:1;
+Vin=S*t;
+printf("\n Vin(t) = %.0f*t",S);
+Rf=5000; //in Ohm
+C=10^-8; //in farad
+dy=diff(S*t/step); //approximate differentiation of sine function
+Vout=-Rf*C*dy;
+printf("\n Vou(t) = %.0f V",Vout);
+t=(0:0.1:5*%pi)';
+plot(t,3*squarewave(t));
+xtitle("Output Wave form","t","V");
+xtitle('Input(b) and Output(r)','t');
diff --git a/2528/CH10/EX10.8/Ex10_8.sce b/2528/CH10/EX10.8/Ex10_8.sce
new file mode 100755
index 000000000..e79985eec
--- /dev/null
+++ b/2528/CH10/EX10.8/Ex10_8.sce
@@ -0,0 +1,47 @@
+//Chapter 10
+//Sketch the output Waveform
+//page no. 370
+//Example10_8
+//Figure 10.24a
+//Given
+clc;
+clear;
+Ri=250; //in Ohm
+Ci=0.5*10^-6; //in farad
+Rf=40000; //in Ohm
+Cf=2*10^-9; //in farad
+fhf=1/(2*%pi*Rf*Cf);
+fh_in=1/(2*%pi*Ri*Ci);
+printf("\n Fhigh(f dbk)=%.0f Hz",fhf);
+printf("\n Fhigh(in)=%.0f Hz",fh_in);
+//
+
+S=10; //in V/S
+step=1;
+disp(S,"For slope")
+t=0:step:1;
+Vin=10*t;
+dy=diff(S*t/step); //approximate differentiation of sine function
+Vout=-Rf*Ci*dy;
+printf("\n Vout(t) = %.1f V",Vout);
+//
+Slope=-4/0.2; //in V/S
+step=1;
+disp(Slope,"For slope")
+t=0:step:1;
+Vin=10*t;
+dy=diff(Slope*t/step); //approximate differentiation of sine function
+Vout2=-Rf*Ci*dy;
+printf("\n Vout(t) = %.1f V",Vout2);
+//graph
+t=(0:0.0001:1.5);
+V=Vout*ones(0:0.0001:.2);
+V=[V zeros(.2+.0001:0.0001:.5-.0001)];
+V=[V Vout2*ones(.5:0.0001:.7)];
+V=[V zeros(.7+.0001:0.0001:1-.0001)];
+V=[V Vout*ones(1:0.0001:1.2)];
+V=[V zeros(1.2+.0001:.0001:1.5)]
+clf;
+plot(t,V)
+
+xtitle('Differentiator output','$t$',"$Voltage$")