diff options
author | shamikam | 2017-11-07 15:59:48 +0530 |
---|---|---|
committer | shamikam | 2017-11-07 15:59:48 +0530 |
commit | c0c0582462720ed597b00e116506570577614e89 (patch) | |
tree | 31dedd23698e5357b19c810b7d7a8464100ef44a /macros/blackmanharris.sci | |
download | FOSSEE-Signal-Processing-Toolbox-c0c0582462720ed597b00e116506570577614e89.tar.gz FOSSEE-Signal-Processing-Toolbox-c0c0582462720ed597b00e116506570577614e89.tar.bz2 FOSSEE-Signal-Processing-Toolbox-c0c0582462720ed597b00e116506570577614e89.zip |
initial commit
Diffstat (limited to 'macros/blackmanharris.sci')
-rw-r--r-- | macros/blackmanharris.sci | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/macros/blackmanharris.sci b/macros/blackmanharris.sci new file mode 100644 index 0000000..f2affdf --- /dev/null +++ b/macros/blackmanharris.sci @@ -0,0 +1,35 @@ +function w = blackmanharris (m, opt) +//This function returns the filter coefficients of a Blackman-Harris window. +//Calling Sequence +//w = blackmanharris (m) +//w = blackmanharris (m, opt) +//Parameters +//m: positive integer value +//opt: string value, takes "periodic" or "symmetric" +//w: output variable, vector of real numbers +//Description +//This is an Octave function. +//This function returns the filter coefficients of a Blackman-Harris window of length m supplied as input, to the output vector w. +//The second parameter can take the values "periodic" or "symmetric", depending on which the corresponding form of window is returned. The default is symmetric. +//Examples +//blackmanharris(5,"periodic") +//ans = +// 0.00006 +// 0.1030115 +// 0.7938335 +// 0.7938335 +// 0.1030115 + +rhs = argn(2) +if(rhs<1 | rhs>2) +error("Wrong number of input arguments.") +end + + select(rhs) + case 1 then + w = callOctave("blackmanharris",m) + case 2 then + w = callOctave("blackmanharris",m,opt) + end +endfunction + |