summaryrefslogtreecommitdiff
path: root/692/CH2/EX2.7
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /692/CH2/EX2.7
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '692/CH2/EX2.7')
-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