summaryrefslogtreecommitdiff
path: root/2294/CH7
diff options
context:
space:
mode:
Diffstat (limited to '2294/CH7')
-rwxr-xr-x2294/CH7/EX7.1.1/EX7_1_1.sce14
-rwxr-xr-x2294/CH7/EX7.1.2/EX7_1_2.sce29
-rwxr-xr-x2294/CH7/EX7.11/EX7_11.sce27
-rwxr-xr-x2294/CH7/EX7.16/EX7_16.sce41
-rwxr-xr-x2294/CH7/EX7.2/EX7_2.sce12
-rwxr-xr-x2294/CH7/EX7.22/EX7_22.sce32
-rwxr-xr-x2294/CH7/EX7.3/EX7_3.sce17
-rwxr-xr-x2294/CH7/EX7.4/EX7_4.sce15
-rwxr-xr-x2294/CH7/EX7.5/EX7_5.sce28
-rwxr-xr-x2294/CH7/EX7.6/EX7_6.sce23
-rwxr-xr-x2294/CH7/EX7.7/EX7_7.sce40
-rwxr-xr-x2294/CH7/EX7.8/EX7_8.sce14
12 files changed, 292 insertions, 0 deletions
diff --git a/2294/CH7/EX7.1.1/EX7_1_1.sce b/2294/CH7/EX7.1.1/EX7_1_1.sce
new file mode 100755
index 000000000..0fffdbe95
--- /dev/null
+++ b/2294/CH7/EX7.1.1/EX7_1_1.sce
@@ -0,0 +1,14 @@
+//Example 7.1.1
+//Find the laplace transform and Roc of the following signal
+clc;
+close;
+syms t;
+a=5;
+ x=exp(-a*t);
+b=6;c=7;
+s=b+c*%i;
+X=integrate((exp(-(a+s)*t)),'t',0,%inf);
+disp(X);
+disp(real(s));
+disp('Since real(s)>-a,so the integral converges');
+
diff --git a/2294/CH7/EX7.1.2/EX7_1_2.sce b/2294/CH7/EX7.1.2/EX7_1_2.sce
new file mode 100755
index 000000000..2badede11
--- /dev/null
+++ b/2294/CH7/EX7.1.2/EX7_1_2.sce
@@ -0,0 +1,29 @@
+//Example 7_1_2
+//Find the laplace transform and Roc of the following signal.
+clc;
+t=-10:.01:10;
+a=4;
+for i=1:length(t)
+ if t(i)>0 then
+ x(i)=0;
+ else
+ x(i)=-exp(-a*t(i));
+ end
+end
+s=%s;
+numfs=1;
+denfs=s+.04;
+fs=syslin('c',numfs/denfs);
+fs1=csim('impulse',t,fs);
+f=scf(0);
+subplot(2,1,1);
+plot2d(t,x,2);
+xtitle('Phrasing');
+xgrid;
+subplot(2,1,2);
+plot2d(t,fs1,1);
+xtitle('Solution');
+xgrid;
+disp(fs);
+disp('As real(s)<-a,so the integral converges for real(s)<-a');
+xs2jpg(0, 'EX7_1_2-plot-a.jpg');
diff --git a/2294/CH7/EX7.11/EX7_11.sce b/2294/CH7/EX7.11/EX7_11.sce
new file mode 100755
index 000000000..cfdf0668b
--- /dev/null
+++ b/2294/CH7/EX7.11/EX7_11.sce
@@ -0,0 +1,27 @@
+//Example 7.11
+//Find the laplace transform .
+clc;
+t=-10:.01:10;
+for i=1:length(t)
+ if t(i)>=0 then
+ x(i)=exp(-2.*t(i))*sin(2*t(i));
+ else
+ x(i)=0;
+ end
+end
+s=%s;
+numfs=2;
+denfs=(s+2)^2+4;
+fs=syslin('c',numfs/denfs);
+fs1=csim('impulse',t,fs);
+disp(fs);
+f=scf(0);
+subplot(2,1,1);
+plot2d(t,x,2);
+xtitle('Phrasing');
+xgrid;
+subplot(2,1,2);
+plot2d(t,fs1,1);
+xtitle('Solution');
+xgrid;
+xs2jpg(0, 'problem109-plot-a.jpg');
diff --git a/2294/CH7/EX7.16/EX7_16.sce b/2294/CH7/EX7.16/EX7_16.sce
new file mode 100755
index 000000000..cba9f452c
--- /dev/null
+++ b/2294/CH7/EX7.16/EX7_16.sce
@@ -0,0 +1,41 @@
+//Example7.16.1
+//Find the laplace transform .
+clc;
+s=%s;t=-5:5;
+numfs=s^2+4*s+3;
+denfs=(s^2+4*s+5)^2;
+fs=syslin('c',numfs/denfs);
+fs1=csim('impulse',t,fs);
+plot2d(t,fs1,1);
+xtitle('Solution');
+xgrid;
+disp(fs);
+//Example7.16.2
+//Find the laplace transform .
+clc;
+s=%s;t=-5:5;
+numfs=s+3;
+denfs=(s^2+6*s+10);
+fs=syslin('c',numfs/denfs);
+fs1=csim('impulse',t,fs);
+f=scf(0);
+plot2d(t,fs1,1);
+xtitle('Solution');
+xgrid;
+xs2jpg(0, 'EX7_16_2-plot-a.jpg');
+disp(fs);
+//Example7.16.3
+//Find the laplace transform .
+clc;
+s=%s;t=-5:5;
+numfs=(s+2)^2;
+denfs=(s^2+4*s+5)^2;
+fs=syslin('c',numfs/denfs);
+fs1=csim('impulse',t,fs);
+plot2d(t,fs1,1);
+xtitle('Solution');
+xgrid;
+disp(fs);
+
+
+
diff --git a/2294/CH7/EX7.2/EX7_2.sce b/2294/CH7/EX7.2/EX7_2.sce
new file mode 100755
index 000000000..7f64c2933
--- /dev/null
+++ b/2294/CH7/EX7.2/EX7_2.sce
@@ -0,0 +1,12 @@
+//Example 7.2
+//Find the laplace transform and Roc of the following signal
+clc;
+close;
+syms t;
+ x=exp(-3*t)+exp(-2*t);
+b=6;c=7;
+s=b+c*%i;
+X=integrate((exp(-(3+s)*t))+(exp(-(2+s)*t)),'t',0,%inf);
+disp(X);
+disp(real(s));
+disp('Since real(s)>-2,so the integral converges');
diff --git a/2294/CH7/EX7.22/EX7_22.sce b/2294/CH7/EX7.22/EX7_22.sce
new file mode 100755
index 000000000..9fa938870
--- /dev/null
+++ b/2294/CH7/EX7.22/EX7_22.sce
@@ -0,0 +1,32 @@
+//Example 7.22
+//Find the laplace transform .
+clc;
+t=-10:.01:10;
+for i=1:length(t)
+ y(i)=exp(-t(i))-2*exp(-2*t(i))+exp(-3*t(i));
+ x(i)=exp(-0.5*t(i));
+end
+s=%s;
+numfs1=1;
+denfs1=s+0.5;
+fs=syslin('c',numfs1/denfs1);
+numfs2=2;
+denfs2=(s+1)*(s+2)*(s+3);
+fs1=syslin('c',numfs2/denfs2);
+hs=fs1/fs;
+hs1=csim('impulse',t,hs);
+subplot(3,1,1);
+plot2d(t,x,2);
+xtitle('Phrasing');
+xgrid;
+subplot(3,1,2);
+plot2d(t,y,3);
+xtitle('Phrasing');
+xgrid;
+subplot(3,1,3);
+plot2d(t,hs1,1);
+xtitle('Solution');
+xgrid;
+disp(fs,'fs=:');
+disp(fs1,'fs1=:');
+disp(hs,'hs=:');
diff --git a/2294/CH7/EX7.3/EX7_3.sce b/2294/CH7/EX7.3/EX7_3.sce
new file mode 100755
index 000000000..fa4a6bbe4
--- /dev/null
+++ b/2294/CH7/EX7.3/EX7_3.sce
@@ -0,0 +1,17 @@
+//Example 7.3
+//Find the laplace transform and Roc of the following signal
+clc;
+close;
+syms t;
+a=3;b1=-8;
+ x1=exp(-a*t);
+b=6;c=7;
+s=b+c*%i;
+X1=integrate((exp(-(a+s)*t)),'t',0,%inf);
+x2=exp(-2*t);
+X2=integrate((exp(-(b1+s)*t)),'t',-%inf,0);
+disp(X1);
+ disp(X2);
+X=X1+X2;disp(X);
+disp(real(s));
+disp('Since -a< real(s)>-b1,so the integral converges');
diff --git a/2294/CH7/EX7.4/EX7_4.sce b/2294/CH7/EX7.4/EX7_4.sce
new file mode 100755
index 000000000..42825f0fb
--- /dev/null
+++ b/2294/CH7/EX7.4/EX7_4.sce
@@ -0,0 +1,15 @@
+//Example 7.4
+//Find the laplace transform
+clc;
+close;
+syms t;
+b=4;
+ a=2;c=1;
+s=a+c*%i;
+X1=integrate((exp(-(b+s)*t)),'t',0,%inf);
+X2=integrate((exp(-(s-b)*t)),'t',-%inf,0);
+disp(X1);
+ disp(X2);
+X=X1+X2;disp(X)
+disp(real(s));
+disp('Since -b< real(s)<b,so the integral converges');
diff --git a/2294/CH7/EX7.5/EX7_5.sce b/2294/CH7/EX7.5/EX7_5.sce
new file mode 100755
index 000000000..7754a3da5
--- /dev/null
+++ b/2294/CH7/EX7.5/EX7_5.sce
@@ -0,0 +1,28 @@
+//Example 7.5.2
+//Find the laplace transform of the following signal.
+clc;
+close;
+t=-10:.01:10;
+for i=1:length(t)
+ if t(i)>=0 then
+ x(i)=1;
+ else
+ x(i)=0;
+ end
+end
+s=%s;
+numfs=1;
+denfs=s;
+fs=syslin('c',numfs/denfs);
+fs1=csim('impulse',t,fs);
+disp(fs);
+f=scf(0);
+subplot(2,1,1);
+plot2d(t,x,2);
+xtitle('Phrasing');
+xgrid;
+subplot(2,1,2);
+plot2d(t,fs1,1);
+xtitle('solution');
+xgrid;
+xs2jpg(0, 'EX7_5-plot-a.jpg');
diff --git a/2294/CH7/EX7.6/EX7_6.sce b/2294/CH7/EX7.6/EX7_6.sce
new file mode 100755
index 000000000..0fab193b4
--- /dev/null
+++ b/2294/CH7/EX7.6/EX7_6.sce
@@ -0,0 +1,23 @@
+//Example 7.6
+//Find the laplace transform
+clc;
+t=-5:.05:5;
+w=2*%pi;
+x=cos(w*t);
+s=%s;
+numfs=s;
+denfs=s^2+w^2;
+fs=syslin('c',numfs/denfs);
+disp(fs);
+fs1=csim('impulse',t,fs);
+f=scf(0);
+subplot(2,1,1);
+plot2d(t,x,2);
+xtitle('Phrasing');
+xgrid;
+subplot(2,1,2);
+plot2d(t,fs1,1);
+xtitle('Solution');
+xgrid;
+xs2jpg(0, 'EX7_6-plot-a.jpg');
+
diff --git a/2294/CH7/EX7.7/EX7_7.sce b/2294/CH7/EX7.7/EX7_7.sce
new file mode 100755
index 000000000..99b74da9f
--- /dev/null
+++ b/2294/CH7/EX7.7/EX7_7.sce
@@ -0,0 +1,40 @@
+//Example 7.7.1
+//Find the laplace transform of the following.
+clc;
+close;
+syms t,;
+ x=1;
+ a=2;c=1;
+ s=a+c*%i;
+X=integrate((exp(-s*t)),'t',2,%inf);
+ disp(X);
+//Example 7.7.2
+//Find the laplace transform .
+clc;
+t=-10:.01:10;
+for i=1:length(t)
+ if t(i)>=0 then
+ x(i)=(t(i)^2)*exp(-2*t(i));
+ else
+ x(i)=0;
+ end
+end
+s=%s;
+numfs=2;
+denfs=(s+2)^3;
+fs=syslin('c',numfs/denfs);
+fs1=csim('impulse',t,fs);
+disp(fs);
+f=scf(0);
+subplot(2,1,1);
+plot2d(t,x,2);
+xtitle('Phrasing');
+xgrid;
+subplot(2,1,2);
+plot2d(t,fs1,1);
+xtitle('Solution');
+xgrid;
+xs2jpg(0, 'EX7_7_2-plot-a.jpg');
+
+
+
diff --git a/2294/CH7/EX7.8/EX7_8.sce b/2294/CH7/EX7.8/EX7_8.sce
new file mode 100755
index 000000000..c1b5aac57
--- /dev/null
+++ b/2294/CH7/EX7.8/EX7_8.sce
@@ -0,0 +1,14 @@
+//Example7.8
+//Find the laplace transform .
+clc;
+s=%s;t=-10:10;
+numfs=2*s;
+denfs=s^2-8;
+fs=syslin('c',numfs/denfs);
+fs1=csim('impulse',t,fs);
+f=scf(0);
+plot2d(t,fs1,1);
+xtitle('Solution');
+xgrid;
+xs2jpg(0, 'problem110-plot-a.jpg')
+disp(fs,'fs=');