~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to examples/intersci-examples-so/ex16.sce

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Example ex16
 
2
//[1] call intersci with Makefile 
 
3
//
 
4
V=G_make('ex16fi.c','ex16fi.c');
 
5
//[2] run the builder generated by intersci.
 
6
//    Since files and libs were nor transmited 
 
7
//    to intersci we give them here 
 
8
files = ['ex16fi.o';'ex16c.o'];
 
9
libs  = [] ;
 
10
exec ex16fi_builder.sce 
 
11
 
 
12
//[3] run the loader to load the interface 
 
13
//    Note that the file loader.sce 
 
14
//    is changed each time you run a demo 
 
15
//    if several .desc are present in a directory
 
16
exec loader.sce 
 
17
 
 
18
//[4] test the loaded function 
 
19
//Run Scilab functions:
 
20
 
 
21
a=[%t,%t;%f,%f];
 
22
 
 
23
// simple matrix argument 
 
24
 
 
25
b=ext16ca(a);
 
26
if or(b<>~a) then pause,end
 
27
 
 
28
// matrix and return a matrix in a list 
 
29
 
 
30
b=ext16cb(a);
 
31
if or(b(1)<>~a) then pause,end
 
32
 
 
33
// new matrix in intersci 
 
34
 
 
35
b=ext16cc(a);
 
36
if or(b<>~a) then pause,end
 
37
 
 
38
// new matrix returned in a list 
 
39
 
 
40
b=ext16cd(a);
 
41
if or(b(1)<>~a) then pause,end
 
42
 
 
43
// list argument with a matrix  
 
44
 
 
45
b=ext16ce(list(a));
 
46
if or(b<>~a) then pause,end
 
47
 
 
48
// list argument + list output 
 
49
 
 
50
b=ext16cf(list(a));
 
51
if or(b(1)<>~a) then pause,end
 
52
 
 
53
// cboolf 
 
54
 
 
55
b=ext16cg();
 
56
if or(b<>[%f,%t;%t,%f;%f,%t]) then pause,end
 
57
 
 
58
// cboolf + list 
 
59
 
 
60
b=ext16ch();
 
61
if or(b(1)<>[%f,%t;%t,%f;%f,%t]) then pause,end
 
62
 
 
63
 
 
64