summaryrefslogtreecommitdiff
path: root/692/CH2/EX2.7/P2_7.sce
diff options
context:
space:
mode:
Diffstat (limited to '692/CH2/EX2.7/P2_7.sce')
-rwxr-xr-x692/CH2/EX2.7/P2_7.sce18
1 files changed, 18 insertions, 0 deletions
diff --git a/692/CH2/EX2.7/P2_7.sce b/692/CH2/EX2.7/P2_7.sce
new file mode 100755
index 000000000..a20487216
--- /dev/null
+++ b/692/CH2/EX2.7/P2_7.sce
@@ -0,0 +1,18 @@
+//EXAMPLE 2.7,Example of Power signal
+clear ;
+clc ;
+
+Sum=0;
+N=1:10000;
+ for i=1:length(N)
+ h1= 3*((-1)^i);
+ h=h1^2;
+ end
+
+Energy = sum(h);
+ if (Energy/(2*(length(N))+1)<%inf ) then
+ disp ('Power Signal') ;
+ disp(Energy/2,'Power Signal = ');
+ else
+ disp ('Not a Power Signal') ;
+ end