diff options
author | Sunil Shetye | 2018-07-25 17:11:09 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-07-26 23:50:17 +0530 |
commit | 1251f70aa3442736ce6fd9c4fb7fbce412af5a52 (patch) | |
tree | 360311ffaf6151c5066439f481e8ac38cfd047b9 /macros/impz.sci | |
parent | 9ca7882cee16ad48b18df989e8300c697010e55a (diff) | |
download | FOSSEE-Signal-Processing-Toolbox-1251f70aa3442736ce6fd9c4fb7fbce412af5a52.tar.gz FOSSEE-Signal-Processing-Toolbox-1251f70aa3442736ce6fd9c4fb7fbce412af5a52.tar.bz2 FOSSEE-Signal-Processing-Toolbox-1251f70aa3442736ce6fd9c4fb7fbce412af5a52.zip |
code changes by Kartik Hegde during FOSSEE Fellowship 2018
Diffstat (limited to 'macros/impz.sci')
-rw-r--r-- | macros/impz.sci | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/macros/impz.sci b/macros/impz.sci index cfa9b32..1172b81 100644 --- a/macros/impz.sci +++ b/macros/impz.sci @@ -1,6 +1,6 @@ function [x_r, t_r] = impz(b, a, n, fs) +// It gives Impulse response of digital filter -// //Calling Sequence //x_r = impz(b) //x_r = impz(b, a) @@ -8,13 +8,27 @@ function [x_r, t_r] = impz(b, a, n, fs) //x_r = impz(b, a, n, fs) //[x_r, t_r] = impz(b, a, n, fs) -//Parameters -// +//Parameters +//x_r: impz chooses the number of samples and returns the response in the column vector, x_r. +//t_r : impz returns the sample times in the column vector, t_r +// b : numerator coefficients of the filter +// a : denominator coefficients of the filter +// n : samples of the impulse response t(by default ,n = length(t) and is computed automatically. +// fs : sampling frequency //Description +//[x_r,t_r] = impz(b,a) returns the impulse response of the filter with numerator coefficients, b, and denominator coefficients, a. impz chooses the number of samples and returns the response in the column vector, x_r, and the sample times in the column vector, t_r. t_r = [0:n-1]' and n = length(t) is computed automatically. //Examples +//[x_r,t_r]=impz([0 1 1],[1 -3 3 -1],10) +//OUTPUT : +// t_r = 0. 1. 2. 3. 4. 5. 6. 7. 8. 9 +// x_r= 0. 1. 4. 9. 16. 25. 36. 49.....64......81 +//[x_r,t_r]=impz(1,[1 1],5) +//OUTPUT +// t_r = 0. 1. 2. 3. 4 +//x_r = 1. - 1. 1. - 1. 1. //This function is being called from Octave |