summaryrefslogtreecommitdiff
path: root/692/CH3/EX3.15/P3_15.sce
diff options
context:
space:
mode:
Diffstat (limited to '692/CH3/EX3.15/P3_15.sce')
-rwxr-xr-x692/CH3/EX3.15/P3_15.sce13
1 files changed, 13 insertions, 0 deletions
diff --git a/692/CH3/EX3.15/P3_15.sce b/692/CH3/EX3.15/P3_15.sce
new file mode 100755
index 000000000..f9e52fd28
--- /dev/null
+++ b/692/CH3/EX3.15/P3_15.sce
@@ -0,0 +1,13 @@
+//EXAMPLE 3.15
+//ENERGY OF A SIGNAL x[n]=a^n*u[n]
+clc;
+clear;
+a=0.5;
+n=0:0.1:9.9;
+//x[n]=a^n*u[n]
+for i = 0:length(n)
+ x(i+1) = a^i;
+ E=(abs(x))^2;
+end
+Energy=sum(E);
+disp(Energy,'Energy of the signal = '); \ No newline at end of file