diff options
author | Ankitr19 | 2017-07-11 09:01:07 +0530 |
---|---|---|
committer | Ankitr19 | 2017-07-11 09:01:07 +0530 |
commit | d0a1f4e5dcddab2290f68a0395970ec471813119 (patch) | |
tree | ad7182dceee9944f1369e30994c32d7dbc7312e9 | |
parent | d13b41b79200c533efad1f5dcc8803ca510ae1be (diff) | |
download | Scilab2C_fossee_old-d0a1f4e5dcddab2290f68a0395970ec471813119.tar.gz Scilab2C_fossee_old-d0a1f4e5dcddab2290f68a0395970ec471813119.tar.bz2 Scilab2C_fossee_old-d0a1f4e5dcddab2290f68a0395970ec471813119.zip |
New demos for signal processing functions
26 files changed, 98 insertions, 0 deletions
diff --git a/demos/ffilt.dem.sce b/demos/ffilt.dem.sce new file mode 100644 index 0000000..0268041 --- /dev/null +++ b/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/demos/filt_sinc.dem.sce b/demos/filt_sinc.dem.sce new file mode 100644 index 0000000..001ceb8 --- /dev/null +++ b/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/demos/fsfirlin.dem.sce b/demos/fsfirlin.dem.sce new file mode 100644 index 0000000..278252a --- /dev/null +++ b/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/demos/scilab2c.dem.gateway.sce b/demos/scilab2c.dem.gateway.sce index b572166..bc158bf 100644 --- a/demos/scilab2c.dem.gateway.sce +++ b/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/jar/scilab_en_US_help.jar b/jar/scilab_en_US_help.jar Binary files differindex cb760b0..42fc9ad 100644 --- a/jar/scilab_en_US_help.jar +++ b/jar/scilab_en_US_help.jar diff --git a/macros/ASTManagement/lib b/macros/ASTManagement/lib Binary files differindex e9d351a..5978ea7 100644 --- a/macros/ASTManagement/lib +++ b/macros/ASTManagement/lib diff --git a/macros/CCodeGeneration/lib b/macros/CCodeGeneration/lib Binary files differindex f2696fe..3181979 100644 --- a/macros/CCodeGeneration/lib +++ b/macros/CCodeGeneration/lib diff --git a/macros/ErrorMessages/lib b/macros/ErrorMessages/lib Binary files differindex 1500b1f..794d4c0 100644 --- a/macros/ErrorMessages/lib +++ b/macros/ErrorMessages/lib diff --git a/macros/FunctionAnnotation/lib b/macros/FunctionAnnotation/lib Binary files differindex 5eb9bc2..bb1f47c 100644 --- a/macros/FunctionAnnotation/lib +++ b/macros/FunctionAnnotation/lib diff --git a/macros/FunctionList/lib b/macros/FunctionList/lib Binary files differindex e101853..c3274f1 100644 --- a/macros/FunctionList/lib +++ b/macros/FunctionList/lib diff --git a/macros/GeneralFunctions/lib b/macros/GeneralFunctions/lib Binary files differindex 846ca1b..1cf5c1f 100644 --- a/macros/GeneralFunctions/lib +++ b/macros/GeneralFunctions/lib diff --git a/macros/Hardware/AVR/lib b/macros/Hardware/AVR/lib Binary files differindex 53e5659..069c520 100644 --- a/macros/Hardware/AVR/lib +++ b/macros/Hardware/AVR/lib diff --git a/macros/Hardware/RasberryPi/lib b/macros/Hardware/RasberryPi/lib Binary files differindex dc759fe..4c85475 100644 --- a/macros/Hardware/RasberryPi/lib +++ b/macros/Hardware/RasberryPi/lib diff --git a/macros/ImageProcessing/core/lib b/macros/ImageProcessing/core/lib Binary files differindex 7f003c8..d80305c 100644 --- a/macros/ImageProcessing/core/lib +++ b/macros/ImageProcessing/core/lib diff --git a/macros/ImageProcessing/highgui/lib b/macros/ImageProcessing/highgui/lib Binary files differindex 787c25f..1e7f750 100644 --- a/macros/ImageProcessing/highgui/lib +++ b/macros/ImageProcessing/highgui/lib diff --git a/macros/ImageProcessing/imgproc/lib b/macros/ImageProcessing/imgproc/lib Binary files differindex 93c8390..a83978b 100644 --- a/macros/ImageProcessing/imgproc/lib +++ b/macros/ImageProcessing/imgproc/lib diff --git a/macros/Scilab-Arduino/lib b/macros/Scilab-Arduino/lib Binary files differindex 5b7beab..f3d5b2f 100644 --- a/macros/Scilab-Arduino/lib +++ b/macros/Scilab-Arduino/lib diff --git a/macros/SymbolTable/lib b/macros/SymbolTable/lib Binary files differindex c42cf1a..e66158d 100644 --- a/macros/SymbolTable/lib +++ b/macros/SymbolTable/lib diff --git a/macros/ToolInitialization/lib b/macros/ToolInitialization/lib Binary files differindex 267c9c9..685205d 100644 --- a/macros/ToolInitialization/lib +++ b/macros/ToolInitialization/lib diff --git a/macros/findDeps/lib b/macros/findDeps/lib Binary files differBinary files differindex 69c3c0e..68ea65d 100644 --- a/macros/findDeps/lib +++ b/macros/findDeps/lib diff --git a/tests/unit_tests/test_ffilt/scilabcode/ffilttest.sci b/tests/unit_tests/test_ffilt/scilabcode/ffilttest.sci new file mode 100644 index 0000000..fcf1732 --- /dev/null +++ b/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/tests/unit_tests/test_ffilt/scilabcode/main.sci b/tests/unit_tests/test_ffilt/scilabcode/main.sci new file mode 100644 index 0000000..ced653a --- /dev/null +++ b/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/tests/unit_tests/test_filtsinc/scilabcode/filt_sinctest.sci b/tests/unit_tests/test_filtsinc/scilabcode/filt_sinctest.sci new file mode 100644 index 0000000..ab674b6 --- /dev/null +++ b/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/tests/unit_tests/test_fsfirlin/scilabcode/fsfirlintest.sci b/tests/unit_tests/test_fsfirlin/scilabcode/fsfirlintest.sci new file mode 100644 index 0000000..4ecec4e --- /dev/null +++ b/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/tests/unit_tests/test_fsfirlin/scilabcode/main.sci b/tests/unit_tests/test_fsfirlin/scilabcode/main.sci new file mode 100644 index 0000000..a3acc51 --- /dev/null +++ b/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 |