summaryrefslogtreecommitdiff
path: root/692/CH3/EX3.14
diff options
context:
space:
mode:
Diffstat (limited to '692/CH3/EX3.14')
-rwxr-xr-x692/CH3/EX3.14/P3_14.sce25
1 files changed, 25 insertions, 0 deletions
diff --git a/692/CH3/EX3.14/P3_14.sce b/692/CH3/EX3.14/P3_14.sce
new file mode 100755
index 000000000..c8897bdff
--- /dev/null
+++ b/692/CH3/EX3.14/P3_14.sce
@@ -0,0 +1,25 @@
+//EXAMPLE 3.14
+//ENERGY OF LP DISCREET TIME SIGNAL
+//PROGRAM REQUIRES MAXIMA SCILAB TOOLBOX
+clc;
+clear;
+syms n wc w;
+ wc = input("the value of wc ( less than %pi)= ");
+n = -5:0.05:5;
+
+for i =0:length (n)
+ hlp(i+1) = (wc/%pi)*sinc((wc*i)/%pi);
+ E(i+1)=(abs(hlp(i+1)))^2;
+end
+
+Energy = sum(E);
+ if (Energy<%inf ) then
+ disp ('The filter is Energy Signal') ;
+ else
+ if (Energy/length(N)<%inf ) then
+ disp ('Power Signal') ;
+ else
+ disp ('Niether Energy nor Power Signal') ;
+ end
+ end
+disp(Energy,'the energy is = '); \ No newline at end of file