summaryrefslogtreecommitdiff
path: root/3838/CH6
diff options
context:
space:
mode:
Diffstat (limited to '3838/CH6')
-rw-r--r--3838/CH6/EX6.10.b/EX6_10_b.sce16
-rw-r--r--3838/CH6/EX6.12.a/EX6_12_A.sce33
-rw-r--r--3838/CH6/EX6.12.c/EX6_12_C.sce33
-rw-r--r--3838/CH6/EX6.12.d/EX6_12_D.sce35
-rw-r--r--3838/CH6/EX6.12.e/EX6_12_E.sce33
-rw-r--r--3838/CH6/EX6.13.a/EX6_13_A.sce34
-rw-r--r--3838/CH6/EX6.13.b/EX6_13_B.sce33
-rw-r--r--3838/CH6/EX6.13.c/EX6_13_C.sce33
-rw-r--r--3838/CH6/EX6.4.A/EX6_4_A.sce9
-rw-r--r--3838/CH6/EX6.4.b/EX6_4_B.sce9
-rw-r--r--3838/CH6/EX6.4.c/EX6_4_C.sce9
-rw-r--r--3838/CH6/EX6.4.d/EX6_4_D.sce9
-rw-r--r--3838/CH6/EX6.5.a/EX6_5_A.sce26
-rw-r--r--3838/CH6/EX6.5.b/EX6_5_B.sce25
-rw-r--r--3838/CH6/EX6.6.a/EX6_6_A.sce7
-rw-r--r--3838/CH6/EX6.6.c/EX6_6_C.sce8
16 files changed, 352 insertions, 0 deletions
diff --git a/3838/CH6/EX6.10.b/EX6_10_b.sce b/3838/CH6/EX6.10.b/EX6_10_b.sce
new file mode 100644
index 000000000..981b8d66c
--- /dev/null
+++ b/3838/CH6/EX6.10.b/EX6_10_b.sce
@@ -0,0 +1,16 @@
+//Example 6 . 6 10 b
+clc ;
+n0 =1;
+N =10;
+for n =1: N
+x ( n ) =n;
+y ( n ) =n*x(n);
+end
+inputshift = (n)*x(N-n0) ;
+outputshift = y (N - n0 ) ;
+if( inputshift == outputshift )
+disp ( 'THE GIVEN SYSTEM I S TIME INVARIANT ' )
+else
+disp ( 'THE GIVEN SYSTEM I S TIME VARIANT ' ) ;
+end
+
diff --git a/3838/CH6/EX6.12.a/EX6_12_A.sce b/3838/CH6/EX6.12.a/EX6_12_A.sce
new file mode 100644
index 000000000..ff5f27e12
--- /dev/null
+++ b/3838/CH6/EX6.12.a/EX6_12_A.sce
@@ -0,0 +1,33 @@
+//example 6.12.a
+clear;
+clc;
+x1 = [1,1,1,1];
+x2 = [2,2,2,2];
+a = 1;
+b = 1;
+for n = 1:length(x1)
+ x3(n) = a*x1(n)+b*x2(n);
+end
+for n = 1:length(x1)
+ y1(n) = n*x1(n);
+ y2(n) = n*x2(n);
+ y3(n) = n*x3(n);
+end
+for n = 1:length(y1)
+ z(n) = a*y1(n)+b*y2(n);
+end
+count = 0;
+for n =1:length(y1)
+ if(y3(n)== z(n))
+ count = count+1;
+ end
+end
+if(count == length(y3))
+ disp('Since It satisifies the superposition principle')
+ disp('The given system is a Linear system')
+ y3
+ z
+ else
+ disp('Since It does not satisify the superposition principle')
+ disp('The given system is a Non-Linear system')
+end
diff --git a/3838/CH6/EX6.12.c/EX6_12_C.sce b/3838/CH6/EX6.12.c/EX6_12_C.sce
new file mode 100644
index 000000000..8835cfa96
--- /dev/null
+++ b/3838/CH6/EX6.12.c/EX6_12_C.sce
@@ -0,0 +1,33 @@
+//EXAMPLE 6.12.C
+clear;
+clc;
+x1 = [1,1,1,1];
+x2 = [2,2,2,2];
+a = 1;
+b = 1;
+for n = 1:length(x1)
+ x3(n) = a*x1(n)+b*x2(n);
+end
+for n = 1:length(x1)
+ y1(n) = (x1(n)^2);
+ y2(n) = (x2(n)^2);
+ y3(n) = (x3(n)^2);
+end
+for n = 1:length(y1)
+ z(n) = a*y1(n)+b*y2(n);
+end
+count = 0;
+for n =1:length(y1)
+ if(y3(n)== z(n))
+ count = count+1;
+ end
+end
+if(count == length(y3))
+ disp('Since It satisifies the superposition principle')
+ disp('The given system is a Linear system')
+ y3
+ z
+ else
+ disp('Since It does not satisify the superposition principle')
+ disp('The given system is a Non-Linear system')
+end
diff --git a/3838/CH6/EX6.12.d/EX6_12_D.sce b/3838/CH6/EX6.12.d/EX6_12_D.sce
new file mode 100644
index 000000000..f72fa4c19
--- /dev/null
+++ b/3838/CH6/EX6.12.d/EX6_12_D.sce
@@ -0,0 +1,35 @@
+//EXAMPLE 6.12.D
+clear;
+clc;
+x1 = [1,1,1,1];
+x2 = [2,2,2,2];
+a = 1;
+b = 1;
+A=2
+B=3;
+for n = 1:length(x1)
+ x3(n) = a*x1(n)+b*x2(n);
+end
+for n = 1:length(x1)
+ y1(n) = A*x1(n)+B;
+ y2(n) = A*x2(n)+B;
+ y3(n) = A*x3(n)+B;
+end
+for n = 1:length(y1)
+ z(n) = a*y1(n)+b*y2(n);
+end
+count = 0;
+for n =1:length(y1)
+ if(y3(n)== z(n))
+ count = count+1;
+ end
+end
+if(count == length(y3))
+ disp('Since It satisifies the superposition principle')
+ disp('The given system is a Linear system')
+ y3
+ z
+ else
+ disp('Since It does not satisify the superposition principle')
+ disp('The given system is a Non-Linear system')
+end
diff --git a/3838/CH6/EX6.12.e/EX6_12_E.sce b/3838/CH6/EX6.12.e/EX6_12_E.sce
new file mode 100644
index 000000000..7e093f054
--- /dev/null
+++ b/3838/CH6/EX6.12.e/EX6_12_E.sce
@@ -0,0 +1,33 @@
+//EXAMPLE 6.12.e
+clear;
+clc;
+x1 = [1,1,1,1];
+x2 = [2,2,2,2];
+a = 1;
+b = 1;
+for n = 1:length(x1)
+ x3(n) = a*x1(n)+b*x2(n);
+end
+for n = 1:length(x1)
+ y1(n) = exp(x1(n));
+ y2(n) = exp(x2(n));
+ y3(n) = exp(x3(n));
+end
+for n = 1:length(y1)
+ z(n) = a*y1(n)+b*y2(n);
+end
+count = 0;
+for n =1:length(y1)
+ if(y3(n)== z(n))
+ count = count+1;
+ end
+end
+if(count == length(y3))
+ disp('Since It satisifies the superposition principle')
+ disp('The given system is a Linear system')
+ y3
+ z
+ else
+ disp('Since It does not satisify the superposition principle')
+ disp('The given system is a Non-Linear system')
+end
diff --git a/3838/CH6/EX6.13.a/EX6_13_A.sce b/3838/CH6/EX6.13.a/EX6_13_A.sce
new file mode 100644
index 000000000..6abc12438
--- /dev/null
+++ b/3838/CH6/EX6.13.a/EX6_13_A.sce
@@ -0,0 +1,34 @@
+//EXAMPLE 6.13.a
+clear;
+clc;
+x1 = [1,1,1,1];
+x2 = [2,2,2,2];
+a = 1;
+b = 1;
+C=3;
+for n = 1:length(x1)
+ x3(n) = a*x1(n)+b*x2(n);
+end
+for n = 1:length(x1)
+ y1(n) = x1(n)+C;
+ y2(n) = x2(n)+C;
+ y3(n) = x3(n)+C;
+end
+for n = 1:length(y1)
+ z(n) = a*y1(n)+b*y2(n);
+end
+count = 0;
+for n =1:length(y1)
+ if(y3(n)== z(n))
+ count = count+1;
+ end
+end
+if(count == length(y3))
+ disp('Since It satisifies the superposition principle')
+ disp('The given system is a Linear system')
+ y3
+ z
+ else
+ disp('Since It does not satisify the superposition principle')
+ disp('The given system is a Non-Linear system')
+end
diff --git a/3838/CH6/EX6.13.b/EX6_13_B.sce b/3838/CH6/EX6.13.b/EX6_13_B.sce
new file mode 100644
index 000000000..2aa460e20
--- /dev/null
+++ b/3838/CH6/EX6.13.b/EX6_13_B.sce
@@ -0,0 +1,33 @@
+//EXAMPLE 6.13.b
+clear;
+clc;
+x1 = [1,1,1,1];
+x2 = [2,2,2,2];
+a = 1;
+b = 1;
+for n = 1:length(x1)
+ x3(n) = a*x1(n)+b*x2(n);
+end
+for n = 1:length(x1)
+ y1(n) = a^(x1(n));
+ y2(n) = a^(x2(n));
+ y3(n) = a^(x3(n));
+end
+for n = 1:length(y1)
+ z(n) = a*y1(n)+b*y2(n);
+end
+count = 0;
+for n =1:length(y1)
+ if(y3(n)== z(n))
+ count = count+1;
+ end
+end
+if(count == length(y3))
+ disp('Since It satisifies the superposition principle')
+ disp('The given system is a Linear system')
+ y3
+ z
+ else
+ disp('Since It does not satisify the superposition principle')
+ disp('The given system is a Non-Linear system')
+end
diff --git a/3838/CH6/EX6.13.c/EX6_13_C.sce b/3838/CH6/EX6.13.c/EX6_13_C.sce
new file mode 100644
index 000000000..c586cbb22
--- /dev/null
+++ b/3838/CH6/EX6.13.c/EX6_13_C.sce
@@ -0,0 +1,33 @@
+//EXAMPLE 6.13.C
+clear;
+clc;
+x1 = [1,1,1,1];
+x2 = [2,2,2,2];
+a = 1;
+b = 1;
+for n = 1:length(x1)
+ x3(n) = a*x1(n)+b*x2(n);
+end
+for n = 1:length(x1)
+ y1(n) = n*(x1(n))^(2);
+ y2(n) = n*(x2(n))^(2);
+ y3(n) = n*(x3(n))^(2);
+end
+for n = 1:length(y1)
+ z(n) = a*y1(n)+b*y2(n);
+end
+count = 0;
+for n =1:length(y1)
+ if(y3(n)== z(n))
+ count = count+1;
+ end
+end
+if(count == length(y3))
+ disp('Since It satisifies the superposition principle')
+ disp('The given system is a Linear system')
+ y3
+ z
+ else
+ disp('Since It does not satisify the superposition principle')
+ disp('The given system is a Non-Linear system')
+end
diff --git a/3838/CH6/EX6.4.A/EX6_4_A.sce b/3838/CH6/EX6.4.A/EX6_4_A.sce
new file mode 100644
index 000000000..fbf51c98a
--- /dev/null
+++ b/3838/CH6/EX6.4.A/EX6_4_A.sce
@@ -0,0 +1,9 @@
+//example 6.4.A
+//check the signal is periodic or not
+clc ;
+n=-15:0.01:15;
+y =sin((6*(%pi)*n/7)+1);
+xlabel('n')
+ylabel('x(n)')
+plot2d(n,y);
+disp ( 'Plot shows that given signal is periodic of fundamental period=7 samples' ) ;
diff --git a/3838/CH6/EX6.4.b/EX6_4_B.sce b/3838/CH6/EX6.4.b/EX6_4_B.sce
new file mode 100644
index 000000000..d2a69a522
--- /dev/null
+++ b/3838/CH6/EX6.4.b/EX6_4_B.sce
@@ -0,0 +1,9 @@
+//example 6_4_B
+//check the signal is periodic or not
+clc ;
+n=-15:0.01:15;
+y =cos((n/8)-(%pi));
+xlabel('n')
+ylabel('x(n)')
+plot(n,y);
+disp ( 'Plot shows that given signal is NOT periodic ' ) ;
diff --git a/3838/CH6/EX6.4.c/EX6_4_C.sce b/3838/CH6/EX6.4.c/EX6_4_C.sce
new file mode 100644
index 000000000..1f3fa7788
--- /dev/null
+++ b/3838/CH6/EX6.4.c/EX6_4_C.sce
@@ -0,0 +1,9 @@
+//example 6.4.C
+//check the signal is periodic or not
+clc ;
+n=-15:0.01:15;
+y =(1+cos(2*(%pi)*n/8)/2);
+xlabel('n')
+ylabel('x(n)')
+plot(n,y);
+disp ( 'Plot shows that given signal is periodic of fundamental period=4 samples' ) ;
diff --git a/3838/CH6/EX6.4.d/EX6_4_D.sce b/3838/CH6/EX6.4.d/EX6_4_D.sce
new file mode 100644
index 000000000..f1358a845
--- /dev/null
+++ b/3838/CH6/EX6.4.d/EX6_4_D.sce
@@ -0,0 +1,9 @@
+//example 6.4.d
+//check the signal is periodic or not
+clc ;
+n=-15:0.01:15;
+y =(cos(7*%pi*n)+%i*sin(7*%pi*n));
+xlabel('n')
+ylabel('x(n)')
+plot(n,y);
+disp ( 'Plot shows that given signal is periodic of fundamental period=2 samples' ) ;
diff --git a/3838/CH6/EX6.5.a/EX6_5_A.sce b/3838/CH6/EX6.5.a/EX6_5_A.sce
new file mode 100644
index 000000000..603fe9206
--- /dev/null
+++ b/3838/CH6/EX6.5.a/EX6_5_A.sce
@@ -0,0 +1,26 @@
+//ex_6.5.a even and odd signals of x(n)
+clear;
+clc;
+close;
+a=2;
+n= 0:0.01:5;
+x=a^(n);
+figure
+a=gca();
+xtitle('x(n)')
+plot2d(n,x)
+figure
+a=gca();
+xtitle('even signal')
+plot2d(n,x/2)
+t1=-5:1/100:0;
+plot2d(t1,x($:-1:1)/2)
+a.y_location='origin'
+figure
+a=gca();
+xtitle('odd signal')
+plot2d(n,x/2)
+t1=-5:1/100:0;
+plot2d(t1,-x($:-1:1)/2)
+a.y_location='origin'
+a.x_location='origin'
diff --git a/3838/CH6/EX6.5.b/EX6_5_B.sce b/3838/CH6/EX6.5.b/EX6_5_B.sce
new file mode 100644
index 000000000..2449ba8ff
--- /dev/null
+++ b/3838/CH6/EX6.5.b/EX6_5_B.sce
@@ -0,0 +1,25 @@
+//ex_6.5.b even and odd signals of x(n)
+clear;
+clc;
+close;
+n= 0:0.01:5;
+x=2*exp(%i*((%pi)/3)*n);
+figure
+a=gca();
+xtitle('x(n)')
+plot2d(n,x)
+figure
+a=gca();
+xtitle('even signal')
+plot2d(n,x/2)
+t1=-5:1/100:0;
+plot2d(t1,x($:-1:1)/2)
+a.y_location='origin'
+figure
+a=gca();
+xtitle('odd signal')
+plot2d(n,x/2)
+t1=-5:1/100:0;
+plot2d(t1,-x($:-1:1)/2)
+a.y_location='origin'
+a.x_location='origin'
diff --git a/3838/CH6/EX6.6.a/EX6_6_A.sce b/3838/CH6/EX6.6.a/EX6_6_A.sce
new file mode 100644
index 000000000..d68cfd28a
--- /dev/null
+++ b/3838/CH6/EX6.6.a/EX6_6_A.sce
@@ -0,0 +1,7 @@
+//ex 6.6.a
+clc;
+E=(1/(1-(0.25)^(2)))
+disp(E);
+disp('AS THE ENERGY OF THE SIGNAL IS FINITE HENCE THE FOLLOWING SIGNALIS ENERGY SIGNAL');
+
+
diff --git a/3838/CH6/EX6.6.c/EX6_6_C.sce b/3838/CH6/EX6.6.c/EX6_6_C.sce
new file mode 100644
index 000000000..92032fd78
--- /dev/null
+++ b/3838/CH6/EX6.6.c/EX6_6_C.sce
@@ -0,0 +1,8 @@
+//ex 6.6.c
+clc;
+N=100//ASSUMING THE N=100
+p=(N)/(2*N)//AS LIMIT N TENDS TO INFINITY HENCE THE EQUATION
+disp(p);
+disp('AS THE POWER OF THE SIGNAL IS FINITE HENCE THE FOLLOWING SIGNALIS POWER SIGNAL');
+
+