diff options
Diffstat (limited to '2528/CH7/EX7.7/Ex7_7.sce')
-rwxr-xr-x | 2528/CH7/EX7.7/Ex7_7.sce | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/2528/CH7/EX7.7/Ex7_7.sce b/2528/CH7/EX7.7/Ex7_7.sce new file mode 100755 index 000000000..b7a162508 --- /dev/null +++ b/2528/CH7/EX7.7/Ex7_7.sce @@ -0,0 +1,30 @@ +// Chapter7
+// Page.No-241
+// Example7_4
+// Sketch the output waveform
+// Given
+clc;
+clear;
+Vi=5; //in V
+Vsat=13; //in V
+R2=2000; //in Ohm
+R1=20000; //in Ohm
+Vupper=Vsat*R2/R1;
+Vlower=-Vsat*R2/R1;
+printf("\n Vupperthreshold %.1f V",Vupper);
+printf("\n Vlowerthreshold %.1f V",Vlower);
+t=(0:0.1:20)';
+f=0.1;
+x3=1*sin(2*f*%pi*t);
+A=asin(Vupper);
+k=atan(imag(A),real(A))
+
+
+x4=squarewave(2*f*%pi*t-2*f*%pi*k,50)
+
+plot(t,x3,t,x4);
+//plot2d1();
+xlabel('time n--->');
+ylabel('Vout--->');
+title('Input(Blue) / Output(Green)');
+xgrid(color("grey"));
|