summaryrefslogtreecommitdiff
path: root/macros/spencer.sci
diff options
context:
space:
mode:
Diffstat (limited to 'macros/spencer.sci')
-rw-r--r--macros/spencer.sci12
1 files changed, 1 insertions, 11 deletions
diff --git a/macros/spencer.sci b/macros/spencer.sci
index 9fbc3ee..25328e2 100644
--- a/macros/spencer.sci
+++ b/macros/spencer.sci
@@ -1,14 +1,3 @@
-// Copyright (C) 2018 - IIT Bombay - FOSSEE
-// This file must be used under the terms of the CeCILL.
-// This source file is licensed as described in the file COPYING, which
-// you should have received as part of this distribution. The terms
-// are also available at
-// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
-// Original Source : https://octave.sourceforge.io/
-// Modifieded by: Abinash Singh Under FOSSEE Internship
-// Last Modified on : 19 March 2024
-// Organization: FOSSEE, IIT Bombay
-// Email: toolbox@scilab.in
function savg = spencer (x)
//Returns Spencer's 15 point moving average of each column of x.
//Calling Sequence:
@@ -32,6 +21,7 @@ function savg = spencer (x)
c = 1;
x = matrix(x, n, 1);
end
+
w = [-3, -6, -5, 3, 21, 46, 67, 74, 67, 46, 21, 3, -5, -6, -3] / 320;
savg = filter (w, 1, x);
savg = [zeros(7,c); savg(15:n,:); zeros(7,c);];