diff options
author | Brijeshcr | 2017-11-30 18:27:20 +0530 |
---|---|---|
committer | Brijeshcr | 2017-11-30 18:27:20 +0530 |
commit | c257cd7a7e766fb89332cca4fb367904767362ed (patch) | |
tree | 8f455c21cddfd7856cb53c9436319b2c68e4ab50 /macros/qp_kaiser.sci | |
parent | cc5c7ee42c6cb2ab94dd0e0f6985778657ab47f5 (diff) | |
download | FOSSEE-Signal-Processing-Toolbox-c257cd7a7e766fb89332cca4fb367904767362ed.tar.gz FOSSEE-Signal-Processing-Toolbox-c257cd7a7e766fb89332cca4fb367904767362ed.tar.bz2 FOSSEE-Signal-Processing-Toolbox-c257cd7a7e766fb89332cca4fb367904767362ed.zip |
Help files and functions
Diffstat (limited to 'macros/qp_kaiser.sci')
-rw-r--r-- | macros/qp_kaiser.sci | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/macros/qp_kaiser.sci b/macros/qp_kaiser.sci new file mode 100644 index 0000000..820fce8 --- /dev/null +++ b/macros/qp_kaiser.sci @@ -0,0 +1,37 @@ +function res = qp_kaiser (nb, at, linear) +//Computes a finite impulse response (FIR) filter for use with a quasi-perfect reconstruction polyphase-network filter bank. +//Calling Sequence +//qp_kaiser (nb, at, linear) +//qp_kaiser (nb, at) +//Parameters +//nb: Number of bands +//at: Attenuation +//linear: When not zero, minimum-phase calculation is omitted. +//Description +//This is an Octave function. +//This version utilizes a Kaiser window to shape the frequency response of the designed filter. Tha number nb of bands and the desired attenuation at in the stop-band are given as parameters. +// +//The Kaiser window is multiplied by the ideal impulse response h(n)=a.sinc(a.n) and converted to its minimum-phase version by means of a Hilbert transform. +//Examples +// qp_kaiser (5, 5, 1) +//ans = +// +// 0.11591 0.25606 0.25606 0.25606 0.11591 + +funcprot(0); +lhs = argn(1) +rhs = argn(2) +if (rhs < 2 | rhs > 3) +error("Wrong number of input arguments.") +end + +select(rhs) + + case 2 then + res = callOctave("qp_kaiser", nb, at) + + case 3 then + res = callOctave("qp_kaiser", nb, at, linear) + + end +endfunction |