diff options
author | Rashmi Patankar | 2025-04-30 15:01:49 +0530 |
---|---|---|
committer | GitHub | 2025-04-30 15:01:49 +0530 |
commit | 0495a12104d8466509769fc34271757f00577709 (patch) | |
tree | cb208dd421d39051d85f4ef0476c9208ef2c41ab /macros/downsample.sci | |
parent | a0bff158d21c2c12a12781bc5019f3a45bd866b2 (diff) | |
parent | ec6379e7494ff4ca2dc7c7524013d109be450bae (diff) | |
download | FOSSEE-Signal-Processing-Toolbox-0495a12104d8466509769fc34271757f00577709.tar.gz FOSSEE-Signal-Processing-Toolbox-0495a12104d8466509769fc34271757f00577709.tar.bz2 FOSSEE-Signal-Processing-Toolbox-0495a12104d8466509769fc34271757f00577709.zip |
Fixed Failing test scripts
Diffstat (limited to 'macros/downsample.sci')
-rw-r--r-- | macros/downsample.sci | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/macros/downsample.sci b/macros/downsample.sci index e0bc508..864f054 100644 --- a/macros/downsample.sci +++ b/macros/downsample.sci @@ -10,6 +10,8 @@ // Email: toolbox@scilab.in + +function y = downsample (x, n, phase) //Function File vary = downsample (x, n) //Function File y = downsample (x, n, offset) // Downsample the signal, selecting every nth element. If x @@ -19,31 +21,18 @@ // sample offset. // // - //Test cases: - //1.downsample([1,2,3,4,5],2) //EXPECTED OUTPUT:[1,3,5] - - //2.downsample([1;2;3;4;5],2) //EXPECTED OUTPUT:[1;3;5] - - //3.downsample([1,2;3,4;5,6;7,8;9,10],2) //EXPECTED OUTPUT:[1,2;5,6;9,10] - - //4.downsample([1,2,3,4,5],2,1) //EXPECTED OUTPUT:[2,4] - - //5.downsample([1,2;3,4;5,6;7,8;9,10],2,1) //EXPECTED OUTPUT:[3,4;7,8] - - -function y = downsample (x, n, phase) [nargout,nargin]=argn(); if (nargin<2 | nargin>3) error ("wrong no. of input arguments"); |