summaryrefslogtreecommitdiff
path: root/3812/CH1/EX1.25.b/1_25_b.sce
diff options
context:
space:
mode:
Diffstat (limited to '3812/CH1/EX1.25.b/1_25_b.sce')
-rw-r--r--3812/CH1/EX1.25.b/1_25_b.sce20
1 files changed, 20 insertions, 0 deletions
diff --git a/3812/CH1/EX1.25.b/1_25_b.sce b/3812/CH1/EX1.25.b/1_25_b.sce
new file mode 100644
index 000000000..6e081b1ad
--- /dev/null
+++ b/3812/CH1/EX1.25.b/1_25_b.sce
@@ -0,0 +1,20 @@
+//Example 1.25<b>
+//Check whether the following signal is linear or not.
+clear ;
+close ;
+clc ;
+T =20; //length of the signal
+for n=1: T
+x1(n)=n;x2(n)=2*n;
+y1(n)=x1(n)*x1(n);
+y2(n)=x2(n)*x2(n);
+end
+z=y1+y2;
+for n =1: T
+y3(n)=( x1(n)+x2(n)) ^2;
+end
+if z== y3 then
+disp('The following signal is linear');
+else
+disp ( 'The following signal is non linear');
+end