diff options
author | Brijeshcr | 2017-07-11 13:00:43 +0530 |
---|---|---|
committer | GitHub | 2017-07-11 13:00:43 +0530 |
commit | 5774ee3f40eed7ba48f427db3e4bc35fcbfac1c4 (patch) | |
tree | 004642df9aeb29cc63cb753745547fd32579151a | |
parent | f55e3c1bd4f625f040030f398bb4501ae91d494e (diff) | |
parent | e09999991b1417f0984a8324d92f1d477fc42a15 (diff) | |
download | Scilab2C-5774ee3f40eed7ba48f427db3e4bc35fcbfac1c4.tar.gz Scilab2C-5774ee3f40eed7ba48f427db3e4bc35fcbfac1c4.tar.bz2 Scilab2C-5774ee3f40eed7ba48f427db3e4bc35fcbfac1c4.zip |
Merge pull request #16 from Ankitr19/master
New demos for signal processing functions
26 files changed, 98 insertions, 0 deletions
diff --git a/2.3-1/demos/ffilt.dem.sce b/2.3-1/demos/ffilt.dem.sce new file mode 100644 index 00000000..0268041a --- /dev/null +++ b/2.3-1/demos/ffilt.dem.sce @@ -0,0 +1,16 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +//This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Ankit Raj +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/test_ffilt/scilabcode/main.sci",TMPDIR,SCI2CHOME+"/tests/unit_tests/test_ffilt/scilabcode"); diff --git a/2.3-1/demos/filt_sinc.dem.sce b/2.3-1/demos/filt_sinc.dem.sce new file mode 100644 index 00000000..001ceb87 --- /dev/null +++ b/2.3-1/demos/filt_sinc.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +//This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Ankit Raj +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/test_filtsinc/scilabcode/filt_sinctest.sci",TMPDIR,SCI2CHOME+"/tests/unit_tests/test_filtsinc/scilabcode"); diff --git a/2.3-1/demos/fsfirlin.dem.sce b/2.3-1/demos/fsfirlin.dem.sce new file mode 100644 index 00000000..278252ae --- /dev/null +++ b/2.3-1/demos/fsfirlin.dem.sce @@ -0,0 +1,16 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +//This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Ankit Raj +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/test_fsfirlin/scilabcode/main.sci",TMPDIR,SCI2CHOME+"/tests/unit_tests/test_fsfirlin/scilabcode"); diff --git a/2.3-1/demos/scilab2c.dem.gateway.sce b/2.3-1/demos/scilab2c.dem.gateway.sce index b572166c..bc158bfa 100644 --- a/2.3-1/demos/scilab2c.dem.gateway.sce +++ b/2.3-1/demos/scilab2c.dem.gateway.sce @@ -39,6 +39,9 @@ subdemolist = ["Trigonometric Identity" , "TrigonometricIdentity.dem.sce"; "Arduino analog output", "analog_out.dem.sce"; "Arduino DC motor", "dc_motor.dem.sce"; "Arduino Master write", "master_write.dem.sce"; + "Ffilt coeff. of FIR low pass filter","ffilt.dem.sce"; + "Design of FIR linear phase filters using freq. samping technique","fsfirlin.dem.sce"; + "Samples of sinc function","filt_sinc.dem.sce"; ]; subdemolist(:,2) = demopath + subdemolist(:,2); diff --git a/2.3-1/jar/scilab_en_US_help.jar b/2.3-1/jar/scilab_en_US_help.jar Binary files differindex cb760b05..42fc9ad4 100644 --- a/2.3-1/jar/scilab_en_US_help.jar +++ b/2.3-1/jar/scilab_en_US_help.jar diff --git a/2.3-1/macros/ASTManagement/lib b/2.3-1/macros/ASTManagement/lib Binary files differindex e9d351a5..5978ea72 100644 --- a/2.3-1/macros/ASTManagement/lib +++ b/2.3-1/macros/ASTManagement/lib diff --git a/2.3-1/macros/CCodeGeneration/lib b/2.3-1/macros/CCodeGeneration/lib Binary files differindex f2696fef..31819793 100644 --- a/2.3-1/macros/CCodeGeneration/lib +++ b/2.3-1/macros/CCodeGeneration/lib diff --git a/2.3-1/macros/ErrorMessages/lib b/2.3-1/macros/ErrorMessages/lib Binary files differindex 1500b1fa..794d4c01 100644 --- a/2.3-1/macros/ErrorMessages/lib +++ b/2.3-1/macros/ErrorMessages/lib diff --git a/2.3-1/macros/FunctionAnnotation/lib b/2.3-1/macros/FunctionAnnotation/lib Binary files differindex 5eb9bc2f..bb1f47c6 100644 --- a/2.3-1/macros/FunctionAnnotation/lib +++ b/2.3-1/macros/FunctionAnnotation/lib diff --git a/2.3-1/macros/FunctionList/lib b/2.3-1/macros/FunctionList/lib Binary files differindex e101853b..c3274f18 100644 --- a/2.3-1/macros/FunctionList/lib +++ b/2.3-1/macros/FunctionList/lib diff --git a/2.3-1/macros/GeneralFunctions/lib b/2.3-1/macros/GeneralFunctions/lib Binary files differindex 846ca1b2..1cf5c1f5 100644 --- a/2.3-1/macros/GeneralFunctions/lib +++ b/2.3-1/macros/GeneralFunctions/lib diff --git a/2.3-1/macros/Hardware/AVR/lib b/2.3-1/macros/Hardware/AVR/lib Binary files differindex 53e56599..069c520e 100644 --- a/2.3-1/macros/Hardware/AVR/lib +++ b/2.3-1/macros/Hardware/AVR/lib diff --git a/2.3-1/macros/Hardware/RasberryPi/lib b/2.3-1/macros/Hardware/RasberryPi/lib Binary files differindex dc759fe8..4c85475b 100644 --- a/2.3-1/macros/Hardware/RasberryPi/lib +++ b/2.3-1/macros/Hardware/RasberryPi/lib diff --git a/2.3-1/macros/ImageProcessing/core/lib b/2.3-1/macros/ImageProcessing/core/lib Binary files differindex 7f003c8e..d80305c4 100644 --- a/2.3-1/macros/ImageProcessing/core/lib +++ b/2.3-1/macros/ImageProcessing/core/lib diff --git a/2.3-1/macros/ImageProcessing/highgui/lib b/2.3-1/macros/ImageProcessing/highgui/lib Binary files differindex 787c25fa..1e7f7507 100644 --- a/2.3-1/macros/ImageProcessing/highgui/lib +++ b/2.3-1/macros/ImageProcessing/highgui/lib diff --git a/2.3-1/macros/ImageProcessing/imgproc/lib b/2.3-1/macros/ImageProcessing/imgproc/lib Binary files differindex 93c83909..a83978b5 100644 --- a/2.3-1/macros/ImageProcessing/imgproc/lib +++ b/2.3-1/macros/ImageProcessing/imgproc/lib diff --git a/2.3-1/macros/Scilab-Arduino/lib b/2.3-1/macros/Scilab-Arduino/lib Binary files differindex 5b7beab0..f3d5b2fc 100644 --- a/2.3-1/macros/Scilab-Arduino/lib +++ b/2.3-1/macros/Scilab-Arduino/lib diff --git a/2.3-1/macros/SymbolTable/lib b/2.3-1/macros/SymbolTable/lib Binary files differindex c42cf1a5..e66158d4 100644 --- a/2.3-1/macros/SymbolTable/lib +++ b/2.3-1/macros/SymbolTable/lib diff --git a/2.3-1/macros/ToolInitialization/lib b/2.3-1/macros/ToolInitialization/lib Binary files differindex 267c9c9f..685205d4 100644 --- a/2.3-1/macros/ToolInitialization/lib +++ b/2.3-1/macros/ToolInitialization/lib diff --git a/2.3-1/macros/findDeps/lib b/2.3-1/macros/findDeps/lib Binary files differindex 69c3c0e1..68ea65d7 100644 --- a/2.3-1/macros/findDeps/lib +++ b/2.3-1/macros/findDeps/lib diff --git a/2.3-1/macros/lib b/2.3-1/macros/lib Binary files differindex f759663f..9f133493 100644 --- a/2.3-1/macros/lib +++ b/2.3-1/macros/lib diff --git a/2.3-1/tests/unit_tests/test_ffilt/scilabcode/ffilttest.sci b/2.3-1/tests/unit_tests/test_ffilt/scilabcode/ffilttest.sci new file mode 100644 index 00000000..fcf1732f --- /dev/null +++ b/2.3-1/tests/unit_tests/test_ffilt/scilabcode/ffilttest.sci @@ -0,0 +1,8 @@ +function ffilttest() + ft="sb"; + ni=5; + fc=0.2; + fh=0.9; + xi=ffilt(ft,ni,fc,fh); + disp(xi); +endfunction diff --git a/2.3-1/tests/unit_tests/test_ffilt/scilabcode/main.sci b/2.3-1/tests/unit_tests/test_ffilt/scilabcode/main.sci new file mode 100644 index 00000000..ced653a3 --- /dev/null +++ b/2.3-1/tests/unit_tests/test_ffilt/scilabcode/main.sci @@ -0,0 +1,12 @@ +// The main function test the ffilt function +// ffilt->returns the coefficients of FIR low pass filter +function main() + ft="sb"; //ft is the type of filter + ni=5; //ni is the number of filters sample required + fc=0.2; //low frequency cutoff + fh=0.9; //high cutoff frequency + xi=ffilt(ft,ni,fc,fh); + disp(xi); +endfunction +//output +// 0.2449143 0.4898285 - 0.4 0.4898285 0.2449143 diff --git a/2.3-1/tests/unit_tests/test_filtsinc/scilabcode/filt_sinctest.sci b/2.3-1/tests/unit_tests/test_filtsinc/scilabcode/filt_sinctest.sci new file mode 100644 index 00000000..ab674b67 --- /dev/null +++ b/2.3-1/tests/unit_tests/test_filtsinc/scilabcode/filt_sinctest.sci @@ -0,0 +1,10 @@ +//This is the demo for filt_sinc function +//This function gives the samples of the sinc fuction +function filt_sinctest() + ni=int(10); //This is the number of samples + fc=2; //This is the cut-off freq. of the assosciated low pass filter + sd=filt_sinc(ni,fc); + disp(sd); +endfunction +//output +// diff --git a/2.3-1/tests/unit_tests/test_fsfirlin/scilabcode/fsfirlintest.sci b/2.3-1/tests/unit_tests/test_fsfirlin/scilabcode/fsfirlintest.sci new file mode 100644 index 00000000..4ecec4ea --- /dev/null +++ b/2.3-1/tests/unit_tests/test_fsfirlin/scilabcode/fsfirlintest.sci @@ -0,0 +1,6 @@ +function fsfirlintest() + in=[1 2 3 4 5 6 7 8]; + flg=2; + op=fsfirlin(in,flg); + disp(op); +endfunction diff --git a/2.3-1/tests/unit_tests/test_fsfirlin/scilabcode/main.sci b/2.3-1/tests/unit_tests/test_fsfirlin/scilabcode/main.sci new file mode 100644 index 00000000..a3acc51b --- /dev/null +++ b/2.3-1/tests/unit_tests/test_fsfirlin/scilabcode/main.sci @@ -0,0 +1,9 @@ +//This is the demo file to test the function fsfirlin +//The function gives design of FIR,linear phase filters using frequency sampling technique +function main() + in=[1 2 3 4 5 6 7 8]; //This is the vector of desired frequency responses samples + flg=2; //flg=2 for type-2 filter , it can be 1 for type-1 filter + op=fsfirlin(in,flg); + disp(op); +endfunction +//output |