18
to create a shared executable
22
Linking generic_gateway
24
Interface 0 generic_gateway
27
[p,q,r]=mexfunction1(1:4,'qwerty');
29
This function requires 2 inputs
34
if r~='qwerty' then bugmes();quit;end
36
[a,x]=mexfunction2(20,'x');
38
if a~=20 then bugmes();quit;end
40
A=rand(2,2);B=rand(2,3);
44
if norm(A*B-C) > %eps then bugmes();quit;end
46
p=mexfunction4(1:3,'x');
48
if p ~= poly(1:3,'x') then bugmes();quit;end
52
if and(w1~=(1:5)) then bugmes();quit;end
56
if and(w2~=(1:5)) then bugmes();quit;end
58
w=rand(2,3);w(10,15)=0;w=sparse(w);
60
mexfunction7(mtlb_sparse(w));
78
if w(1)~='123456789 ' then bugmes();quit;end
80
mexfunction9() // prints something calling disp
87
A=mexfunction10() // search myvar
90
variable myvar not found
92
if A<>"variable myvar not found" then bugmes();quit;end
96
A=mexfunction10() // search myvar again
99
variable myvar found size=[1,45]
101
if A<>"variable myvar found size=[1,45]" then bugmes();quit;end
105
mexfunction11() // creates A11 with a mexEvalString
107
if A11<>[1,2,3,4] then bugmes();quit;end
110
mexfunction12() // creates C with a WriteMatrix (<==> mxPutArray)
112
if C<>matrix(0:7,4,2) then bugmes();quit;end
115
mexfunction13() // creates X with a mexEvalString
118
variable X found size=[1,3]
120
// then try to get it with mexGetArray
122
if X<>[1,2,3] then bugmes();quit;end