From 01779a9f1594491392d9db34c8ed3da61e8a3ab1 Mon Sep 17 00:00:00 2001 From: rupak Date: Fri, 11 Oct 2019 18:14:26 +0530 Subject: writing more test cases --- builder.sce | 2 +- help/en_US/master_help.xml | 23 -- help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS | Bin 246 -> 0 bytes .../scilab_en_US_help/JavaHelpSearch/DOCS.TAB | Bin 63 -> 0 bytes .../en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS | 1 - .../scilab_en_US_help/JavaHelpSearch/POSITIONS | Bin 573 -> 0 bytes help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA | 2 - help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP | Bin 2048 -> 0 bytes help/en_US/scilab_en_US_help/ScilabCaution.png | Bin 603 -> 0 bytes help/en_US/scilab_en_US_help/ScilabEdit.png | Bin 574 -> 0 bytes help/en_US/scilab_en_US_help/ScilabExecute.png | Bin 660 -> 0 bytes help/en_US/scilab_en_US_help/ScilabImportant.png | Bin 717 -> 0 bytes help/en_US/scilab_en_US_help/ScilabNote.png | Bin 863 -> 0 bytes help/en_US/scilab_en_US_help/ScilabTip.png | Bin 863 -> 0 bytes help/en_US/scilab_en_US_help/ScilabWarning.png | Bin 603 -> 0 bytes help/en_US/scilab_en_US_help/c_code.css | 54 --- help/en_US/scilab_en_US_help/index.html | 55 --- help/en_US/scilab_en_US_help/jhelpidx.xml | 3 - help/en_US/scilab_en_US_help/jhelpmap.jhm | 7 - help/en_US/scilab_en_US_help/jhelpset.hs | 28 -- help/en_US/scilab_en_US_help/jhelptoc.xml | 9 - help/en_US/scilab_en_US_help/octave_fun.html | 109 ------ help/en_US/scilab_en_US_help/scilab_code.css | 96 ------ .../section_597319ec0f8f262cff8ce5d679429f35.html | 55 --- help/en_US/scilab_en_US_help/style.css | 378 --------------------- help/en_US/scilab_en_US_help/xml_code.css | 94 ----- jar/scilab_en_US_help.jar | Bin 16473 -> 0 bytes macros/octave_fun.bin | Bin 4262 -> 4262 bytes sci_gateway/cpp/sci_octave.cpp | 2 + tests/pulsedata_t.txt | 1 + tests/pulsedata_x.txt | 1 + tests/signal.sce | 119 +++++++ tests/test.sce | 125 ++++++- thirdparty/linux/lib/x64/libfun.so | Bin 2856224 -> 2856224 bytes 34 files changed, 246 insertions(+), 918 deletions(-) delete mode 100644 help/en_US/master_help.xml delete mode 100644 help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS delete mode 100644 help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB delete mode 100644 help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS delete mode 100644 help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS delete mode 100644 help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA delete mode 100644 help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP delete mode 100644 help/en_US/scilab_en_US_help/ScilabCaution.png delete mode 100644 help/en_US/scilab_en_US_help/ScilabEdit.png delete mode 100644 help/en_US/scilab_en_US_help/ScilabExecute.png delete mode 100644 help/en_US/scilab_en_US_help/ScilabImportant.png delete mode 100644 help/en_US/scilab_en_US_help/ScilabNote.png delete mode 100644 help/en_US/scilab_en_US_help/ScilabTip.png delete mode 100644 help/en_US/scilab_en_US_help/ScilabWarning.png delete mode 100644 help/en_US/scilab_en_US_help/c_code.css delete mode 100644 help/en_US/scilab_en_US_help/index.html delete mode 100644 help/en_US/scilab_en_US_help/jhelpidx.xml delete mode 100644 help/en_US/scilab_en_US_help/jhelpmap.jhm delete mode 100644 help/en_US/scilab_en_US_help/jhelpset.hs delete mode 100644 help/en_US/scilab_en_US_help/jhelptoc.xml delete mode 100644 help/en_US/scilab_en_US_help/octave_fun.html delete mode 100644 help/en_US/scilab_en_US_help/scilab_code.css delete mode 100644 help/en_US/scilab_en_US_help/section_597319ec0f8f262cff8ce5d679429f35.html delete mode 100644 help/en_US/scilab_en_US_help/style.css delete mode 100644 help/en_US/scilab_en_US_help/xml_code.css delete mode 100644 jar/scilab_en_US_help.jar create mode 100644 tests/pulsedata_t.txt create mode 100644 tests/pulsedata_x.txt create mode 100644 tests/signal.sce diff --git a/builder.sce b/builder.sce index 20e9300..5e5b4e2 100644 --- a/builder.sce +++ b/builder.sce @@ -38,7 +38,7 @@ function main_builder() tbx_builder_macros(toolbox_dir); tbx_builder_gateway(toolbox_dir); tbx_build_localization(toolbox_dir); - tbx_builder_help(toolbox_dir); +// tbx_builder_help(toolbox_dir); tbx_build_loader(toolbox_dir); tbx_build_cleaner(toolbox_dir); diff --git a/help/en_US/master_help.xml b/help/en_US/master_help.xml deleted file mode 100644 index 275890c..0000000 --- a/help/en_US/master_help.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - -]> - - - scilab_octave - - - -scilab_octave -&a2ed2d4be3584d8c38302185542e7a55c; - - diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS deleted file mode 100644 index 9ed5472..0000000 Binary files a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS and /dev/null differ diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB deleted file mode 100644 index 744a232..0000000 Binary files a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB and /dev/null differ diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS b/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS deleted file mode 100644 index c3c7752..0000000 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS +++ /dev/null @@ -1 +0,0 @@ -‡PƒÎÀk` \ No newline at end of file diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS b/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS deleted file mode 100644 index 1f3a4f5..0000000 Binary files a/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS and /dev/null differ diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA b/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA deleted file mode 100644 index ea929e5..0000000 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA +++ /dev/null @@ -1,2 +0,0 @@ -JavaSearch 1.0 -TMAP bs=2048 rt=0 fl=-1 id1=119 id2=1 diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP b/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP deleted file mode 100644 index 452fdba..0000000 Binary files a/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP and /dev/null differ diff --git a/help/en_US/scilab_en_US_help/ScilabCaution.png b/help/en_US/scilab_en_US_help/ScilabCaution.png deleted file mode 100644 index 98d26d9..0000000 Binary files a/help/en_US/scilab_en_US_help/ScilabCaution.png and /dev/null differ diff --git a/help/en_US/scilab_en_US_help/ScilabEdit.png b/help/en_US/scilab_en_US_help/ScilabEdit.png deleted file mode 100644 index e3ad3b8..0000000 Binary files a/help/en_US/scilab_en_US_help/ScilabEdit.png and /dev/null differ diff --git a/help/en_US/scilab_en_US_help/ScilabExecute.png b/help/en_US/scilab_en_US_help/ScilabExecute.png deleted file mode 100644 index 9bfead1..0000000 Binary files a/help/en_US/scilab_en_US_help/ScilabExecute.png and /dev/null differ diff --git a/help/en_US/scilab_en_US_help/ScilabImportant.png b/help/en_US/scilab_en_US_help/ScilabImportant.png deleted file mode 100644 index 7793271..0000000 Binary files a/help/en_US/scilab_en_US_help/ScilabImportant.png and /dev/null differ diff --git a/help/en_US/scilab_en_US_help/ScilabNote.png b/help/en_US/scilab_en_US_help/ScilabNote.png deleted file mode 100644 index d32cffa..0000000 Binary files a/help/en_US/scilab_en_US_help/ScilabNote.png and /dev/null differ diff --git a/help/en_US/scilab_en_US_help/ScilabTip.png b/help/en_US/scilab_en_US_help/ScilabTip.png deleted file mode 100644 index d32cffa..0000000 Binary files a/help/en_US/scilab_en_US_help/ScilabTip.png and /dev/null differ diff --git a/help/en_US/scilab_en_US_help/ScilabWarning.png b/help/en_US/scilab_en_US_help/ScilabWarning.png deleted file mode 100644 index 98d26d9..0000000 Binary files a/help/en_US/scilab_en_US_help/ScilabWarning.png and /dev/null differ diff --git a/help/en_US/scilab_en_US_help/c_code.css b/help/en_US/scilab_en_US_help/c_code.css deleted file mode 100644 index 948d2ee..0000000 --- a/help/en_US/scilab_en_US_help/c_code.css +++ /dev/null @@ -1,54 +0,0 @@ -.ccomment { - font-style: italic; - color: #b22222 -} - -.cdefault { - font-style: normal; - color: #000000 -} - -.copenclose { - font-style: normal; - color: #000000 -} - -.coperator { - font-style: normal; - color: #000000 -} - -.cstring { - font-style: normal; - color: #a6557a -} - -.ctype { - font-style: normal; - color: #55a655 -} - -.cpreprocessor { - font-style: normal; - color: #9965a6 -} - -.cid { - font-style: normal; - color: #000000 -} - -.ckeyword { - font-style: normal; - color: #ad3ff2 -} - -.cmodifier { - font-style: normal; - color: #ad3ff2 -} - -.cnumber { - font-style: normal; - color: #008b8b -} diff --git a/help/en_US/scilab_en_US_help/index.html b/help/en_US/scilab_en_US_help/index.html deleted file mode 100644 index e39997b..0000000 --- a/help/en_US/scilab_en_US_help/index.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - -
- - - - -
- - - - - -
-
-
- - - - -

-

scilab_octave

- -
- -
- - - - - - -
Report an issue
- - - - - -
-
-
- - diff --git a/help/en_US/scilab_en_US_help/jhelpidx.xml b/help/en_US/scilab_en_US_help/jhelpidx.xml deleted file mode 100644 index aa5a66e..0000000 --- a/help/en_US/scilab_en_US_help/jhelpidx.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/help/en_US/scilab_en_US_help/jhelpmap.jhm b/help/en_US/scilab_en_US_help/jhelpmap.jhm deleted file mode 100644 index db10acc..0000000 --- a/help/en_US/scilab_en_US_help/jhelpmap.jhm +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/help/en_US/scilab_en_US_help/jhelpset.hs b/help/en_US/scilab_en_US_help/jhelpset.hs deleted file mode 100644 index 5b2ffe5..0000000 --- a/help/en_US/scilab_en_US_help/jhelpset.hs +++ /dev/null @@ -1,28 +0,0 @@ - - - -scilab_octave - -top - - - -TOC - -javax.help.TOCView -jhelptoc.xml - - -Index - -javax.help.IndexView -jhelpidx.xml - - -Search - -javax.help.SearchView -JavaHelpSearch - - \ No newline at end of file diff --git a/help/en_US/scilab_en_US_help/jhelptoc.xml b/help/en_US/scilab_en_US_help/jhelptoc.xml deleted file mode 100644 index 5eb0f55..0000000 --- a/help/en_US/scilab_en_US_help/jhelptoc.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/help/en_US/scilab_en_US_help/octave_fun.html b/help/en_US/scilab_en_US_help/octave_fun.html deleted file mode 100644 index c586a94..0000000 --- a/help/en_US/scilab_en_US_help/octave_fun.html +++ /dev/null @@ -1,109 +0,0 @@ - - - octave_fun - - - -
- - - - -
- << scilab_octave - - - scilab_octave - - - -
-
-
- - - - scilab_octave >> scilab_octave > octave_fun - -

-

octave_fun

-

Calls an octave function with given inputs and returns the expected output

- - -

Syntax

-
[y1, y2, ...] = octave_fun("octave_function",input1,input2,...)
-[y1, y2, ...] = octave_fun("octave_function",input1,input2,...,optional_input1,optional_input2,...)
-[y1, y2, ...] = octave_fun("octave_function","octave_package",input1,input2,...)
-[y1, y2, ...] = octave_fun("octave_function","octave_package",input1,input2,...,optional_input1,optional_input2,...)
- -

Parameters

-
y : -

ouput as returned by octave. It can be a vector or matrix of doubles

-
octave_function : -

name of the function in octave that has to be called. It has to be a string in double quotes

-
input : -

input as expected by the octave function. It can be a vector or matrix of doubles

-
optional_input : -

an optional argument that the given octave function can accept. It has to be a string in double quotes

-
octave_package : -

name of the package in octave that has to be loaded as required by the octave function. It has to be a string in double quotes

- -

Description

-

This function accepts an octave function name with the relevant inputs and returns the output as generated. It requires Octave to be installed along with necessary packages.

-

-

- -

Examples

-
// Finding the inverse of a matrix using octave
-A=[1 2 3;4 5 6;7 8 0]
-y = octave_fun("inv",A)
-y*A
- -

Examples

-
// Finding the roots of a polynomial using its coefficients as inputs, using octave
-p = [1 2 3];
-y = octave_fun("roots",p)
- -

Examples

-
// Generating filter coefficients of a Hamming window of length M, using octave.
-M = 5
-y = octave_fun("hamming",M)
- -

Examples

-
// Generating filter coefficients of a Hamming window of length M with optional arguments, using octave.
-M = 5
-y = octave_fun("hamming",M,"periodic")
- -

Examples

-
// Generating an elliptic or Cauer filter with given passband ripple and stopband attenuation, using octave and its "signal" package. See help in octave for more information about "ellip" function
-[b, a]=octave_fun("ellip","signal",5,1,90,[0.1 0.2])
- -

Authors

-
-
- -
- - - - - - -
Report an issue
- << scilab_octave - - - scilab_octave - - - -
-
-
- - diff --git a/help/en_US/scilab_en_US_help/scilab_code.css b/help/en_US/scilab_en_US_help/scilab_code.css deleted file mode 100644 index 658f42e..0000000 --- a/help/en_US/scilab_en_US_help/scilab_code.css +++ /dev/null @@ -1,96 +0,0 @@ -.scilabcomment { - font-style: italic; - color: #01a801 -} - -.scilabdefault { - font-style: normal; - color: #000000 -} - -.scilabspecial { - font-style: normal; - color: #ffaa00 -} - -.scilabconstants { - font-style: normal; - color: #da70d6 -} - -.scilaboperator { - font-style: normal; - color: #5c5c5c -} - -.scilabnumber { - font-style: normal; - color: #bc8f8f -} - -.scilabfkeyword { - font-style: normal; - color: #b01813 -} - -.scilabskeyword { - font-style: normal; - color: #a020f0 -} - -.scilabckeyword { - font-style: normal; - color: #5f9ea0 -} - -.scilabcommand { - font-style: normal; - color: #32b9b9 -} - -.scilabmacro { - font-style: normal; - color: #ae5cb0 -} - -a.scilabcommand { - font-style: normal; - text-decoration: underline; - color: #32b9b9 -} - -a.scilabmacro { - font-style: normal; - text-decoration: underline; - color: #ae5cb0 -} - -.scilabstring { - font-style: normal; - color: #bc8f8f -} - -.scilabid { - font-style: normal; - color: #000000 -} - -.scilabinputoutputargs { - font-weight: bold; - color: #834310 -} - -.scilabfunctionid { - font-weight: bold; - color: #000000 -} - -.scilabfield { - font-style: normal; - color: #aaaaaa -} - -.scilabopenclose { - font-style: normal; - color: #4a55db -} diff --git a/help/en_US/scilab_en_US_help/section_597319ec0f8f262cff8ce5d679429f35.html b/help/en_US/scilab_en_US_help/section_597319ec0f8f262cff8ce5d679429f35.html deleted file mode 100644 index a828712..0000000 --- a/help/en_US/scilab_en_US_help/section_597319ec0f8f262cff8ce5d679429f35.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - -
- - - - -
- - - scilab_octave - - - -
-
-
- - - - scilab_octave >> scilab_octave - -

-

scilab_octave

- -
- -
- - - - - - -
Report an issue
- - - scilab_octave - - - -
-
-
- - diff --git a/help/en_US/scilab_en_US_help/style.css b/help/en_US/scilab_en_US_help/style.css deleted file mode 100644 index 93bd898..0000000 --- a/help/en_US/scilab_en_US_help/style.css +++ /dev/null @@ -1,378 +0,0 @@ -body { - color:#000000; - background-color:#ffffff; - font-family:sans-serif; - font-size:100%; - margin:5px; - padding:0; - background : url("/img/body.png"); - background-repeat : repeat-x; -} - -.para { - padding-left: 10px; -} - -.refname { - color: #ff6c0a; -} -.refpurpose { - font-size: 110%; -} - -.synopsis { - border: 1px solid #CCCCCC; - width:80%; - padding: 0.5em; -} - -.editbar { - text-align: right; -} - -.term { - color:#A00000; - font-size:100%; - font-weight: 600; -} - -h3 { - color: #0033FF; - font-weight: bold; - font-size:130%; - margin-bottom: 10px; -} - -h4 { - color: #0066FF; - font-weight: bold; - font-size:120%; - margin-bottom: 5px; -} - -h5 { - color: #0099FF; - font-weight: bold; - font-size:110%; - margin-bottom: 1px; -} - -.programlisting { - font-family: monospace; - font-size: 100%; - background-color:#F4F4FF; - border-color:#CCCCCC; - border-style:solid; - border-width:2px medium; - width:90%; - color:#333333; - line-height:120%; - padding:10px; -} - -.literal { - font-family: monospace; - font-size: 100%; -} - -.option { - font-family: monospace; - font-style: italic; - font-size: 100%; -} - -.command { - font-family: monospace; - font-size: 100%; - color: #32b9b9; -} - -.function { - font-family: monospace; - font-size: 100%; - color: #32b9b9; -} - -.varname { - font-family: monospace; - font-weight: bold; - font-size: 100%; -} - -.constant { - font-family: monospace; - font-size: 100%; - color: #da70d6; -} - -a { - color: blue; - text-decoration:none; -} - -a:hover { - text-decoration:underline; -} - -.itemizedlist { - list-style-type: disc; -} - -.inline-list li { - display: inline; - list-style-type: disc; -} - -.vert-list { - list-style-type: disc; -} - -pre { - margin-bottom: 0px; - margin-top: 0px; -} - -.leftpart { - position:absolute; - float:left; - width: 186px; - padding: 5px; - font-size: smaller; -} - -.content { - margin-top: 100px; - margin-left: 196px -} - -.container { - margin: 0 auto; - width:1024px; -} - -ul.toc li.list-active { - list-style-type:disc; - font-weight:bold; -} - -ul.toc li.parent { - font-size: 115%; - padding: 5px 0px 5px 11px; - border-bottom: 1px solid #cccccc; - margin-bottom: 5px; -} - -ul.toc li.root { - font-size: 135%; - padding: 5px 0px 5px 11px; - border-bottom: 1px solid #cccccc; - margin-bottom: 5px; -} - -ul.toc li { - font-size: 85%; - margin: 1px 0 1px 1px; - padding: 1px 0 1px 11px; - background-repeat: no-repeat; - background-position: center left; - list-style-type: circle; -} - -.next { - float:right; - text-align: right; -} - -.center { - text-align: center; -} - -.screen { - font-family: monospace; - font-size: 100%; - background-color:#FFFFFF; - border-color:#CCCCCC; - border-style:solid; - border-width:2px medium; - width:90%; - color:#333333; - line-height:120%; - padding:10px; -} - -/* Top and bottom navigation controls on manual pages --------------------- */ -div.manualnavbar { - background-color: #F0F0FF; - color: inherit; - padding: 4px; - margin-bottom: 10px; -} -div.manualnavbar .prev { - padding-right: 4px; -} -div.manualnavbar .next { - text-align: right; - padding-left: 4px; -} - -div.manualnavbar .top { - text-align: center; - display: block; -} - -div.manualnavbar hr { - color: #cccccc; - background-color: #cccccc; -} - -/* Footer navigation area ------------------------------------------------- */ - -#pagefooter { - position: relative; - font-size: 75%; - color: inherit; - background-color: #e5e5e5; - width: 100%; -} - -#pagefooterleft { - top: 0px; - left: 0px; - padding: 6px; - margin-right: 30%; -} - -#pagefooterright { - text-align: right; - margin-left: 50%; - padding: 6px; -} -#footnav { - color: inherit; - background-color: #9999cc; - border-width: 1px 0px; - border-color: #333366; - border-style: solid; - text-align: right; - padding-right: 6px; -} - - - - - #global{ -/* width: 90%; */ - max-width: 90em; -/* min-width: 850px; */ - margin-left: auto; - margin-right: auto; - } - - #myHeader{ - background-color:#000000; - color:white; - margin-bottom : 10px; - position : relative; - text-align: center; -/* width : 1024px;*/ - height : 100px; - padding-left : 20px; - background : url("http://atoms.scilab.org/images/homepage/cadre_head.png"); - background-repeat : no-repeat; - background-position : 0px 0px; - - } - - #myFooter{ - background-color:#E5E5E5; - font-color:black; -/* width: 90%;*/ - max-width: 90em; -/* min-width: 850px; - margin-left: 5%; - margin-right: 5%;*/ - margin-top:10px; - padding:10px; - } - - #mainArea{ - width: 100%; - overflow: hidden; - } - - #myLeftArea{ - color:white; - float: left; - width: 180px; - padding:5px; - } - - #myMiddleArea{ - color:black; - margin-left: 200px; - padding: 10px 20px; - } - - #myRightArea{ - color:white; - float: right; - width: 200px; - padding: 12px 20px; - } - - -div#cadre_head -{ - position : relative; - text-align: center; -/* width : 1024px;*/ - height : 100px; - padding-left : 20px; - background : url("/img/cadre_head.png"); - background-repeat : no-repeat; - background-position : 0px 0px; -} - - -div#slogan{ - position: absolute; - top : 50px; - left:251px; - color:#0000AA; - font: 120%, Georgia,Serif; -} -div#cadre_help -{ - position: absolute; - top:45px; - right:0px; - font-size:0.8em; - color:#0000AA; -} -table -{ - border-collapse:collapse -} -th, td { - padding: 4px; -} -table.revhistory -{ - width:90%; - border-color:#CCCCCC; - border-style:solid; - border-width:2px medium; - margin-bottom: 10px; -} - -table.revhistory tr.title td -{ - background-color: #CCCCEE; - font-weight: bold; -} - -td.revnumber -{ - vertical-align: top; -} - diff --git a/help/en_US/scilab_en_US_help/xml_code.css b/help/en_US/scilab_en_US_help/xml_code.css deleted file mode 100644 index 9e4c27f..0000000 --- a/help/en_US/scilab_en_US_help/xml_code.css +++ /dev/null @@ -1,94 +0,0 @@ -.xmlcomment { - font-style: italic; - color: #01a801 -} - -.xmldefault { - font-style: normal; - color: #000000 -} - -.xmlentity { - font-style: normal; - color: #ffaa00 -} - -.xmlopeninstr { - font-style: normal; - color: #000000 -} - -.xmlcloseinstr { - font-style: normal; - color: #000000 -} - -.xmlinstrname { - font-style: normal; - color: #9965a6 -} - -.xmllowtag { - font-style: normal; - color: #000000 -} - -.xmltagname { - font-style: normal; - color: #0303ff -} - -.xmllowclose { - font-style: normal; - color: #000000 -} - -.xmlopencomment { - font-style: italic; - color: #01a801 -} - -.xmlcommentend { - font-style: italic; - color: #01a801 -} - -.xmlcomment { - font-style: italic; - color: #01a801 -} - -.xmlopencdata { - font-style: normal; - color: #c45555 -} - -.xmlcdataend { - font-style: normal; - color: #c45555 -} - -.xmlcdata { - font-style: normal; - color: #000000 -} - -.xmlattributename { - font-style: normal; - color: #9965a6 -} - -.xmlequal { - font-style: normal; - color: #000000 -} - -.xmlattributevalue { - font-style: normal; - color: #973964 -} - -.xmlautoclose { - font-style: normal; - color: #000000 -} diff --git a/jar/scilab_en_US_help.jar b/jar/scilab_en_US_help.jar deleted file mode 100644 index 8169a1d..0000000 Binary files a/jar/scilab_en_US_help.jar and /dev/null differ diff --git a/macros/octave_fun.bin b/macros/octave_fun.bin index b1ab402..b3d3d1e 100644 Binary files a/macros/octave_fun.bin and b/macros/octave_fun.bin differ diff --git a/sci_gateway/cpp/sci_octave.cpp b/sci_gateway/cpp/sci_octave.cpp index 0e9c228..939d05b 100644 --- a/sci_gateway/cpp/sci_octave.cpp +++ b/sci_gateway/cpp/sci_octave.cpp @@ -155,6 +155,7 @@ int sci_octave_fun(scilabEnv env, int nin, scilabVar* in, int nopt, scilabOpt* o if(ins[i].is_out_cmplx==1) { + //printf("output %d is complex\n", i); out[i] = scilab_createDoubleMatrix2d(env, ins[i].n_out_rows, ins[i].n_out_cols, 1); double* out_real = NULL; double* out_img = NULL; @@ -175,6 +176,7 @@ int sci_octave_fun(scilabEnv env, int nin, scilabVar* in, int nopt, scilabOpt* o } else { + //printf("output %d is NOT complex\n", i); out[i] = scilab_createDoubleMatrix2d(env, ins[i].n_out_rows, ins[i].n_out_cols, 0); double* out1 = NULL; scilab_getDoubleArray(env, out[i], &out1); diff --git a/tests/pulsedata_t.txt b/tests/pulsedata_t.txt new file mode 100644 index 0000000..cc9dcc6 --- /dev/null +++ b/tests/pulsedata_t.txt @@ -0,0 +1 @@ +0.000000 0.025000 0.050000 0.075000 0.100000 0.125000 0.150000 0.175000 0.200000 0.225000 0.250000 0.275000 0.300000 0.325000 0.350000 0.375000 0.400000 0.425000 0.450000 0.475000 0.500000 0.525000 0.550000 0.575000 0.600000 0.625000 0.650000 0.675000 0.700000 0.725000 0.750000 0.775000 0.800000 0.825000 diff --git a/tests/pulsedata_x.txt b/tests/pulsedata_x.txt new file mode 100644 index 0000000..800ef63 --- /dev/null +++ b/tests/pulsedata_x.txt @@ -0,0 +1 @@ +0.000000 0.010800 0.036700 -0.045200 0.017200 0.006400 -0.026200 -0.008700 0.006900 0.071600 0.055400 -0.027000 0.060700 5.014500 4.998700 5.014300 4.995900 4.997500 5.029800 0.028200 0.028300 0.013400 -0.024100 0.014300 0.032600 0.009800 0.020700 0.014500 -0.006100 0.005900 -0.015700 0.017800 -0.022900 4.978600 diff --git a/tests/signal.sce b/tests/signal.sce new file mode 100644 index 0000000..c1e3786 --- /dev/null +++ b/tests/signal.sce @@ -0,0 +1,119 @@ +disp("Testing arburg function from signal package") +a = octave_fun("arburg","signal", [1,2,3,4,5],2) +pause + + +disp("Testing aryule function from signal package") +a = octave_fun("aryule","signal", [1,2,3,4,5],2) +pause + + +disp("Testing filter function from signal package") +a = [1 0.1 -0.8]; +v = 0.4; +rand("seed", 0); +w = sqrt(v)*rand(15000,1); +x=octave_fun("filter","signal",1,a,w); +pause + +disp("Testing xcorr function from signal package") +r=octave_fun("xcorr","signal",x); +pause + +disp("Testing levinson function from signal package") +ar=octave_fun("levinson","signal",r,length(a)-1) +pause + +disp("Testing sigmoid_train function from signal package") +s = octave_fun("sigmoid_train",0.1,[1:3],[4]) +pause + + +disp("Testing circshift function from signal package") + M = [1 2 3 4]; + R = octave_fun("circshift",M,[0 1]) +pause + + +disp("Testing kaiser function from signal package") +win = octave_fun("kaiser",6,[0.2]) +pause + + + +disp("Testing autoreg_matrix function from signal package") +m = octave_fun("autoreg_matrix",[1 2 3],[2]) +pause + + +disp("Testing arch_rnd function from signal package") +a = [1 2 3 4 5]; +b = [7 8 9 10]; +t = 5 ; +rand("seed", 0) +m = octave_fun("arch_rnd",a,b,t) +pause + + +disp("Testing postpad function from signal package") +y = octave_fun("postpad",[1 2 3],6) +pause + + +disp("Testing wconv function from signal package") +a = [1 2 3 4 5]; +b = [7 8 9 10]; +y = octave_fun("wconv",[1],a,b) +pause + + +disp("Testing dctmtx function from signal package") +T = octave_fun("dctmtx",[3]) +pause + + +disp("Testing medfilt1 function from signal package") + +fs = 100; +t = 0:1/fs:1; +x = sin(2*%pi*t*3)+0.25*sin(2*%pi*t*40); + +y = octave_fun("medfilt1","signal",x,10); +pause + + +disp("Testing arma_rnd function from signal package") + +a = [1 2 3 4 5]; +b = [7; 8; 9; 10; 11]; +t = 5 ; +v = 10 ; +n = 100 ; +rand("seed", 0) +m = octave_fun("arma_rnd","signal",a, b, v, t, n) +pause + + +disp("Testing ncauer function from signal package") +[z p g] = octave_fun("ncauer","signal",3, 10, 4) +pause + + +disp("Testing ellipap function from signal package") +[z p g] = octave_fun("ellipap","signal",4, 3, 10) +pause + + +disp("Testing besselap function from signal package") +[z p g] = octave_fun("besselap","signal",5) +pause + + +disp("Testing zp2tf function from signal package") +[num, den] = octave_fun("zp2tf","signal",[1 2 3], [4 5 6], 5) +pause + +disp("Testing tf2zp function from signal package") +[z p k] = octave_fun("tf2zp","signal",[1 2 3], [4 5 6]); +pause + diff --git a/tests/test.sce b/tests/test.sce index e7bb727..857e392 100644 --- a/tests/test.sce +++ b/tests/test.sce @@ -1,5 +1,5 @@ -exec build.sce +//exec build.sce test_pass=[] res=[] @@ -251,15 +251,134 @@ else test_pass=[test_pass,0] disp("tf2zp Test failed") end + +/////////Test case for buttap ////////// + +n = 5 ; +[z p g] = octave_fun("buttap", n); +g = round(g*10000)/10000; + +if(g == 1) + test_pass=[test_pass,1] +else + test_pass=[test_pass,0] + disp("buttap Test failed") +end + +/////////Test case for cheb1ap ////////// + +[z p g] = octave_fun("cheb1ap", 10, 3); +g = round(g*10000)/10000; + +if(g == 0.002) + test_pass=[test_pass,1] +else + test_pass=[test_pass,0] + disp("cheb1ap Test failed") +end + +/////////Test case for sftrans ////////// +//fc = 100; +//[z p k] = octave_fun("tf2zp","signal",[1 2 3], [4 5 6]) +//[Sz, Sp, Sg] = octave_fun("sftrans",z, p, k, 2*%pi*fc, %f); +//Sz = round(Sz*10000)/10000; + + +//if(Sz ~= 0) +// test_pass=[test_pass,1] +//else +// test_pass=[test_pass,0] +// disp("sftrans Test failed") +//end + +/////////Test case for bilinear ////////// + +[b a] = octave_fun("bilinear","signal",[1 2 3], [4 5 6], 1, 1); +b = round(b*10000)/10000; +a = round(a*10000)/10000; + + +if(b == [0 -0.1667 -0.3333 2.5] & a == [1 7.3333 17.6667 14]) + test_pass=[test_pass,1] +else + test_pass=[test_pass,0] + disp("bilinear Test failed") +end +/////////Test case for buttord ////////// +[n, Wn] = octave_fun("buttord",40/500, 150/500, 3, 60); +Wn = round(Wn*10000)/10000; + +if(n == 5 & Wn == 0.08) + test_pass=[test_pass,1] +else + test_pass=[test_pass,0] + disp("buttord Test failed") +end + +/////////Test case for butter ////////// + +[b a] = octave_fun("butter","signal",4,0.3,"high") +b = round(b*10000)/10000; +a = round(a*10000)/10000; + +if(b == [0.2754 -1.1017 1.6525 -1.1017 0.2754] & a == [1 -1.5704 1.2756 -0.4844 0.0762]) + test_pass=[test_pass,1] +else + test_pass=[test_pass,0] + disp("butter Test failed") +end + +/////////Test case for cheb1ord ////////// + +[n, Wn]=octave_fun("cheb1ord","signal",[0.25 0.3],[0.24 0.31],3,10) +Wn = round(Wn*10000)/10000; + +if(n == 3 & Wn == [0.25 0.3]) + test_pass=[test_pass,1] +else + test_pass=[test_pass,0] + disp("cheb1ord Test failed") +end + +/////////Test case for cheby1 ////////// + +[z, p]=octave_fun("cheby1","signal",2,6,0.7,"high")// Note it shld return k as well +z = round(z*10000)/10000; +p = round(p*10000)/10000; +k = round(k*10000)/10000; + +if(z == [1 1] & p == [-0.6292+0.5537*%i -0.6292-0.5537*%i] & k == 0.0556) + test_pass=[test_pass,1] +else + test_pass=[test_pass,0] + disp("cheby1 Test failed") +end + +/////////Test case for cheb2ord ////////// + +Wp = 40/500; +Ws = 150/500; +Rp = 3; +Rs = 60; +[n,Ws] = octave_fun("cheb2ord",Wp,Ws,Rp,Rs) +Ws = round(Ws*10000)/10000; + +if(n == 4 & Ws == 0.3) + test_pass=[test_pass,1] +else + test_pass=[test_pass,0] + disp("cheb2ord Test failed") +end + ///////////////////////////////////////////// res=find(test_pass==0) if(res~=[]) disp("One or more tests failed in test1") disp(length(test_pass),"Total functions tested:") - exit(1) + //exit(1) else disp(length(test_pass),"Total functions tested:") disp("ALL OK") -exit() +//exit() end diff --git a/thirdparty/linux/lib/x64/libfun.so b/thirdparty/linux/lib/x64/libfun.so index d58e138..f246ee8 100755 Binary files a/thirdparty/linux/lib/x64/libfun.so and b/thirdparty/linux/lib/x64/libfun.so differ -- cgit