summaryrefslogtreecommitdiff
path: root/macros/boxcar.sci
diff options
context:
space:
mode:
Diffstat (limited to 'macros/boxcar.sci')
-rw-r--r--macros/boxcar.sci28
1 files changed, 28 insertions, 0 deletions
diff --git a/macros/boxcar.sci b/macros/boxcar.sci
new file mode 100644
index 0000000..120c6e9
--- /dev/null
+++ b/macros/boxcar.sci
@@ -0,0 +1,28 @@
+function [y] = boxcar (m)
+//This function returns the filter coefficients of a rectangular window.
+//Calling Sequence
+//y = boxcar (m)
+//Parameters
+//m: positive integer value
+//y: output variable, vector of real numbers
+//Description
+//This is an Octave function.
+//This function returns the filter coefficients of a rectangular window of length m supplied as input, to the output vector y.
+//Examples
+//boxcar(6)
+//ans =
+// 1.
+// 1.
+// 1.
+// 1.
+// 1.
+// 1.
+
+rhs = argn(2)
+if(rhs~=1)
+error("Wrong number of input arguments.")
+end
+
+y = callOctave("boxcar",m)
+
+endfunction