From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 2528/CH10/EX10.3/Ex10_3.sce | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 2528/CH10/EX10.3/Ex10_3.sce (limited to '2528/CH10/EX10.3/Ex10_3.sce') 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"); + + + -- cgit