diff options
author | bgtushar | 2017-11-10 15:12:16 +0530 |
---|---|---|
committer | GitHub | 2017-11-10 15:12:16 +0530 |
commit | 577ee768ed44495c84bb236163f684e07a1cad30 (patch) | |
tree | 8ab91353da76f22bc6e54a2b133bbbfd4aeb6aff /macros/wconv.sci | |
parent | 9f6962b19c4a5fa76f7525a72faabb1b754712ad (diff) | |
parent | cc5c7ee42c6cb2ab94dd0e0f6985778657ab47f5 (diff) | |
download | FOSSEE-Signal-Processing-Toolbox-577ee768ed44495c84bb236163f684e07a1cad30.tar.gz FOSSEE-Signal-Processing-Toolbox-577ee768ed44495c84bb236163f684e07a1cad30.tar.bz2 FOSSEE-Signal-Processing-Toolbox-577ee768ed44495c84bb236163f684e07a1cad30.zip |
Merge pull request #2 from Brijeshcr/master
Brijesh functions added
Diffstat (limited to 'macros/wconv.sci')
-rw-r--r-- | macros/wconv.sci | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/macros/wconv.sci b/macros/wconv.sci new file mode 100644 index 0000000..a0682a6 --- /dev/null +++ b/macros/wconv.sci @@ -0,0 +1,33 @@ +function y = wconv (type, x, f, shape) +//Performs 1D or 2D convolution. +//Calling Sequence +//y = wconv (type, x, f) +// y = wconv (type, x, f, shape) +//Parameters +//type: convolution type. +//x: Signal vector or matrix. +//f: FIR filter coefficients. +//shape: Shape. +//Description +//This is an Octave function. +//It performs 1D or 2D convolution between the signal x and the filter coefficients f. +//Examples +//a = [1 2 3 4 5] +//b = [7 8 9 10] +//wconv(1,a,b) +//ans = +// 7 22 46 80 114 106 85 50 + +funcprot(0); +rhs = argn(2) +if(rhs<3 | rhs>4) +error("Wrong number of input arguments.") +end + +select (rhs) + case 3 then + y = callOctave("wconv",type, x, f) + case 4 then + y = callOctave("wconv",type, x, f, shape) + end +endfunction |