summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builder.sce2
-rw-r--r--help/en_US/addchapter.sce5
-rw-r--r--help/en_US/build_help.sce1
-rw-r--r--help_builder.sce36
-rw-r--r--test1.sce28
5 files changed, 58 insertions, 14 deletions
diff --git a/builder.sce b/builder.sce
index 5abb459..00d6a5b 100644
--- a/builder.sce
+++ b/builder.sce
@@ -29,9 +29,7 @@ TOOLBOX_TITLE = "FOSSEE Signal Processing Toolbox";
toolbox_dir = get_absolute_file_path("builder.sce");
-//tbx_builder_gateway(toolbox_dir);
tbx_builder_macros(toolbox_dir);
-tbx_builder_help(toolbox_dir);
tbx_build_loader(TOOLBOX_NAME, toolbox_dir);
tbx_build_cleaner(TOOLBOX_NAME, toolbox_dir);
diff --git a/help/en_US/addchapter.sce b/help/en_US/addchapter.sce
new file mode 100644
index 0000000..99e91e2
--- /dev/null
+++ b/help/en_US/addchapter.sce
@@ -0,0 +1,5 @@
+// This file is released under the 3-clause BSD license. See COPYING-BSD.
+// Generated by tbx_build_help_loader: Please, do not edit this file
+
+add_help_chapter("FOSSEE_Signal_Processing_Toolbox",get_absolute_file_path("addchapter.sce"),%F);
+clear add_help_chapter;
diff --git a/help/en_US/build_help.sce b/help/en_US/build_help.sce
index 5d051c3..5ca95ac 100644
--- a/help/en_US/build_help.sce
+++ b/help/en_US/build_help.sce
@@ -12,5 +12,6 @@
help_lang_dir = get_absolute_file_path('build_help.sce');
tbx_build_help(TOOLBOX_TITLE, help_lang_dir);
+tbx_build_help_loader(TOOLBOX_TITLE, help_lang_dir);
clear help_lang_dir;
diff --git a/help_builder.sce b/help_builder.sce
new file mode 100644
index 0000000..307d65e
--- /dev/null
+++ b/help_builder.sce
@@ -0,0 +1,36 @@
+mode(-1);
+
+// Copyright (C) 2018 - IIT Bombay - FOSSEE
+//
+// This file must be used under the terms of the BSD.
+// This source file is licensed as described in the file LICENSE, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// https://opensource.org/licenses/BSD-3-Clause
+// Author: Sunil Shetye
+// Organization: FOSSEE, IIT Bombay
+// Email: toolbox@scilab.in
+
+lines(0);
+try
+ getversion('scilab');
+catch
+ error(gettext('Scilab 5.5.0 or 5.5.2 is required.'));
+end;
+
+// ====================================================================
+if ~with_module("development_tools") then
+ error(msprintf(gettext("%s module not installed."),"development_tools"));
+end
+// ====================================================================
+TOOLBOX_NAME = "FOSSEE_Signal_Processing_Toolbox";
+TOOLBOX_TITLE = "FOSSEE Signal Processing Toolbox";
+// ====================================================================
+
+
+toolbox_dir = get_absolute_file_path("builder.sce");
+//help_from_sci("macros","help/en_US");
+tbx_builder_help(toolbox_dir);
+exec help/en_US/addchapter.sce
+
+clear toolbox_dir TOOLBOX_NAME TOOLBOX_TITLE;
diff --git a/test1.sce b/test1.sce
index a897d3c..bae700d 100644
--- a/test1.sce
+++ b/test1.sce
@@ -149,6 +149,7 @@ end
a = [1 0.1 -0.8];
v = 0.4;
+rand("seed", 0);
w = sqrt(v)*rand(15000,1,"normal");
x = filter(1,a,w);
@@ -159,7 +160,7 @@ ar = levinson(r,length(a)-1)
ar = round(ar*10000)/10000
-if(ar == [1 0.1043 -0.8010])
+if(ar == [1 0.0984 -0.793])
test_pass=[test_pass,1]
else
test_pass=[test_pass,0]
@@ -171,13 +172,14 @@ end
/////////Test case for 39) lpc //////////
+rand("seed", 0)
noise = rand(50000,1,"normal");
x = filter(1,[1 1/2 1/3 1/4],noise);
x = x(45904:50000);
[a,g]= lpc(x,3)
a = round(a*10000)/10000
-if(a == [1 0.5177 0.3310 0.2572])
+if(a == [1 0.5153 0.3313 0.2783])
test_pass=[test_pass,1]
else
test_pass=[test_pass,0]
@@ -361,14 +363,15 @@ end
a = [1 2 3 4 5];
b = [7 8 9 10];
t = 5 ;
+rand("seed", 0)
m = arch_rnd (a, b, t);
m = round(m*1000)/1000
-if(m == [ 7.476
- 67.124
- 671.105
- 7382.441
- 80409.121 ])
+if(m == [ 7.211
+ 65.48
+ 654.008
+ 7194.657
+ 78364.905 ])
test_pass=[test_pass,1]
else
test_pass=[test_pass,0]
@@ -386,14 +389,15 @@ b = [7; 8; 9; 10; 11];
t = 5 ;
v = 10 ;
n = 100 ;
+rand("seed", 0)
m = arma_rnd (a, b, v, t, n);
m = round(m) ;
-if(m == [ 60562.
- 156019.
- 401911.
- 1035344.
- 2667081. ])
+if(m == [ 61401.
+ 158177.
+ 407440.
+ 1049604.
+ 2703841. ])
test_pass=[test_pass,1]
else
test_pass=[test_pass,0]