File: mexobjs.tst

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (39 lines) | stat: -rw-r--r-- 1,081 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
exec startup.sce;
[p,q,r]=mexfunction1(1:4,'qwerty');
if r~='qwerty' then pause,end
[a,x]=mexfunction2(20,'x');
if a~=20 then pause,end
A=rand(2,2);B=rand(2,3);
C=mexfunction3(A,B);
if norm(A*B-C) > %eps then pause,end
p=mexfunction4(1:3,'x');
if p ~= poly(1:3,'x') then pause,end
w1=mexfunction5(1:5);
if and(w1~=(1:5)) then pause,end
w2=mexfunction6(1:5);
if and(w2~=(1:5)) then pause,end
w=rand(2,3);w(10,15)=0;w=sparse(w);
mexfunction7(mtlb_sparse(w));
w=mexfunction8();
if w(1)~='123456789 ' then pause,end
mexfunction9() // prints something calling disp 

clear myvar;
A=mexfunction10() // search myvar 
if A<>"variable myvar not found" then pause,end
myvar=1:45;
A=mexfunction10() // search myvar again 
if A<>"variable myvar found size=[1,45]" then pause,end


mexfunction11() // creates A11 with a mexEvalString
if A11<>[1,2,3,4] then pause,end

mexfunction12() // creates C with a WriteMatrix (<==> mxPutArray)
if C<>matrix(0:7,4,2) then pause,end

mexfunction13() // creates X with a mexEvalString 
// then try to get it with mexGetArray 
if X<>[1,2,3] then pause,end