diff options
Diffstat (limited to '2048/CH3/EX3.1/energy.sce')
-rwxr-xr-x | 2048/CH3/EX3.1/energy.sce | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/2048/CH3/EX3.1/energy.sce b/2048/CH3/EX3.1/energy.sce new file mode 100755 index 000000000..ca16729bd --- /dev/null +++ b/2048/CH3/EX3.1/energy.sce @@ -0,0 +1,8 @@ +// Energy of a signal
+// 3.1
+
+u = [4 5 6];
+Eu = norm(u)^2;
+ruu = xcorr(u);
+Lu = length(ruu);
+Eu = ruu(ceil(Lu/2));
|