summaryrefslogtreecommitdiff
path: root/2279/CH3/EX3.16
diff options
context:
space:
mode:
Diffstat (limited to '2279/CH3/EX3.16')
-rw-r--r--2279/CH3/EX3.16/Ex3_16.sce21
1 files changed, 21 insertions, 0 deletions
diff --git a/2279/CH3/EX3.16/Ex3_16.sce b/2279/CH3/EX3.16/Ex3_16.sce
new file mode 100644
index 000000000..a1ce9199a
--- /dev/null
+++ b/2279/CH3/EX3.16/Ex3_16.sce
@@ -0,0 +1,21 @@
+//Example 3.16
+clear;
+clc;
+no = 2; //Assume the amount of time shift =2
+L = 10; //Length of given signal
+for n = 1:L
+ x(n)=sin(n);
+ end
+ n=2;
+ for i=1:L
+ y(i)=x(n-1);
+ n=n+1;
+ end
+//First shift the input signal only
+Input_shift = x(L-no);
+Output_shift = y(L-no);
+if(Input_shift == Output_shift)
+ disp('The given discrete system is a Time In-variant system');
+else
+ disp('The given discrete system is a Time Variant system');
+end