diff options
Diffstat (limited to '269/CH8')
-rw-r--r-- | 269/CH8/EX8.1/example1.sce | 18 | ||||
-rw-r--r-- | 269/CH8/EX8.2/ex2.sce | 12 | ||||
-rw-r--r-- | 269/CH8/EX8.3/ex3.sce | 6 | ||||
-rw-r--r-- | 269/CH8/EX8.5/ex5.sce | 15 | ||||
-rw-r--r-- | 269/CH8/EX8.6/ex6.sce | 8 | ||||
-rw-r--r-- | 269/CH8/EX8.7/ex7.sce | 25 |
6 files changed, 84 insertions, 0 deletions
diff --git a/269/CH8/EX8.1/example1.sce b/269/CH8/EX8.1/example1.sce new file mode 100644 index 000000000..4b3ebb865 --- /dev/null +++ b/269/CH8/EX8.1/example1.sce @@ -0,0 +1,18 @@ +Syms t,s
+disp('applyin kvl and solving we get')
+disp('i(s)=1-e^-as/s(s+1) where a is a constant')
+// This can be modified and written as
+a=1
+//by partial fraction
+[A]=pfss((1*s^0+0)/s*(s+1))
+b=ilt(A(1),s,t)
+disp(b)
+d=exp(1*a)//inverse laplace of exp(-sa)
+disp(d)
+//z=ilaplace((%e^-),s,t)
+//disp(z)
+e=ilt((1*s^0+0)/(s+1),s,t)
+f=ilt((d*s^0)/s,s,t)
+g=ilt((d*s^0)/(s+1))
+h=b*d*e*g*f;
+disp(h)
diff --git a/269/CH8/EX8.2/ex2.sce b/269/CH8/EX8.2/ex2.sce new file mode 100644 index 000000000..556e3a864 --- /dev/null +++ b/269/CH8/EX8.2/ex2.sce @@ -0,0 +1,12 @@ +Syms t,s
+disp('i(s)=1/s*(s+1)')
+b=ilt((1*s^0+0)/s,s,t)
+e=ilt((-1*s^0+0)/(s+1),s,t)
+f=b+e
+printf("current in time domain by partial fraction is")
+disp(f,"i(t)=")
+disp('by scaling theorem i1(t)=')
+d=ilt((2*s^0+0)/(2*s),s,t)
+g=ilt((-2*s^0+0)/(2*s+1))
+l=d+g
+disp(l)
diff --git a/269/CH8/EX8.3/ex3.sce b/269/CH8/EX8.3/ex3.sce new file mode 100644 index 000000000..548fb4e2b --- /dev/null +++ b/269/CH8/EX8.3/ex3.sce @@ -0,0 +1,6 @@ +Syms t,s
+disp('By kvl equation\n i(s)=1/s+1')
+f=ilt((s^0)/(s+1),s,t)
+printf("current in time domain by laplace transform is\n")
+printf("i(t)=")
+disp(f)
diff --git a/269/CH8/EX8.5/ex5.sce b/269/CH8/EX8.5/ex5.sce new file mode 100644 index 000000000..1245c5a75 --- /dev/null +++ b/269/CH8/EX8.5/ex5.sce @@ -0,0 +1,15 @@ +Syms t,s
+disp('given')
+disp('i(s)=2s+5/s+1*(s+2)')
+f=(2*s+5)/((s+1)*(s+2))
+[a]=pfss(2*s/(s^2+3*s+2))
+g=a(1)+a(2)
+x=s*f
+y=limit(x,s,0)
+disp('by final value theorem')
+disp(y,"i(inf)=")
+g=ilt(f,s,t)
+disp(g,"time domain exp is")
+h=limit(g,t,%inf)
+disp(h)
+disp('hence verified')
diff --git a/269/CH8/EX8.6/ex6.sce b/269/CH8/EX8.6/ex6.sce new file mode 100644 index 000000000..75a7b4378 --- /dev/null +++ b/269/CH8/EX8.6/ex6.sce @@ -0,0 +1,8 @@ +Syms t,s
+disp('given i2(t)=5-3e^(-2t)')
+f=laplace('5-3*%e^(-2*t)',t,s)
+disp(f,"laplace transformed solution is")
+x=s*f
+disp('by final value theorem')
+y=limit(x,s,0)//final value theorem
+disp(y,"i2(inf)=")
diff --git a/269/CH8/EX8.7/ex7.sce b/269/CH8/EX8.7/ex7.sce new file mode 100644 index 000000000..8ae3dee01 --- /dev/null +++ b/269/CH8/EX8.7/ex7.sce @@ -0,0 +1,25 @@ +s=%s
+Max_Limit = 10;
+h = ones(1,Max_Limit);
+N2 =0:length(h)-1;
+for t = 1: Max_Limit
+ x(t)= exp(-(t -1));
+end
+N1 =0:length(x)-1;
+y = convol(x,h)-1;
+N = 0:length(x)+ length(h)-2;
+figure
+a= gca();
+plot2d (N2 ,h)
+xtitle ( ' Impul s e Re spons e ' , ' t ' , ' h ( t ) ' );
+a. thickness = 2;
+figure
+a= gca ();
+plot2d (N1 ,x)
+xtitle ( ' Input Re spons e ' , ' t ' , ' x ( t ) ' );
+a. thickness = 2;
+figure
+a= gca ();
+plot2d (N(1: Max_Limit ),y (1: Max_Limit ))
+xtitle ( ' Output Re spons e ' , ' t ' , ' y ( t ) ' );
+a. thickness = 2;
|