summaryrefslogtreecommitdiffstats
path: root/scilab_doc
diff options
context:
space:
mode:
authorFarid Belahcene <farid.belahcene@inria.fr>2006-09-01 13:28:40 +0000
committerFarid Belahcene <farid.belahcene@inria.fr>2006-09-01 13:28:40 +0000
commitdfa24b2c6275deddec121f0c12d21fc0c7a057dd (patch)
treed1d4622b3c4a748602f1727ac66435d1ddfb1337 /scilab_doc
parente09ea12464e021d0942b6ef5bef5ec74448b26e7 (diff)
downloadscilab-dfa24b2c6275deddec121f0c12d21fc0c7a057dd.zip
scilab-dfa24b2c6275deddec121f0c12d21fc0c7a057dd.tar.gz
Update toolbox guide
Diffstat (limited to 'scilab_doc')
-rw-r--r--scilab_doc/toolbox_guide/toolbox_example/unit_tests/tests.sce20
1 files changed, 20 insertions, 0 deletions
diff --git a/scilab_doc/toolbox_guide/toolbox_example/unit_tests/tests.sce b/scilab_doc/toolbox_guide/toolbox_example/unit_tests/tests.sce
new file mode 100644
index 0000000..ddb0915
--- /dev/null
+++ b/scilab_doc/toolbox_guide/toolbox_example/unit_tests/tests.sce
@@ -0,0 +1,20 @@
1// Test the macros scilab: foo1
2 B=[1 2 3 4; 5 -6 7 8; 9 10 -11 12 ;-13 14 -15 16]
3 Xtest=[1;16]
4 X=foo1(B)
5 if norm(X-Xtest) > %eps then pause,end
6
7// Test the primitive: scisum
8 a=[1,2,3];b=[4,5,6]
9 c=sumab(a,b)
10 if norm(c-(a+b)) > %eps then pause,end
11
12// Test the primitivre: scifoo
13 A=[2 -4 6 8 9 -7 10 -3]
14 [X,Y]=fun(A)
15 Xtest=[2 6 8 9 10]
16 Ytest=35
17 if (norm(X-Xtest) > %eps | norm(Y-Ytest) > %eps) then pause,end
18 [Z]=fun(A)
19 Ztest=[2 6 8 9 10]
20 if norm(Z-Ztest) > %eps then pause,end