summaryrefslogtreecommitdiff
path: root/2528/CH10/EX10.3/Ex10_3.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2528/CH10/EX10.3/Ex10_3.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 '2528/CH10/EX10.3/Ex10_3.sce')
-rwxr-xr-x2528/CH10/EX10.3/Ex10_3.sce34
1 files changed, 34 insertions, 0 deletions
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");
+
+
+