From e09999991b1417f0984a8324d92f1d477fc42a15 Mon Sep 17 00:00:00 2001 From: Ankitr19 Date: Tue, 11 Jul 2017 09:01:07 +0530 Subject: New demos for signal processing functions --- 2.3-1/tests/unit_tests/test_ffilt/scilabcode/ffilttest.sci | 8 ++++++++ 2.3-1/tests/unit_tests/test_ffilt/scilabcode/main.sci | 12 ++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 2.3-1/tests/unit_tests/test_ffilt/scilabcode/ffilttest.sci create mode 100644 2.3-1/tests/unit_tests/test_ffilt/scilabcode/main.sci (limited to '2.3-1/tests/unit_tests/test_ffilt') 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 -- cgit