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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
|
exec startup.sce;
linking files
generic_gateway.o
mexfunction1.o
mexfunction2.o
mexfunction3.o
mexfunction4.o
mexfunction5.o
mexfunction6.o
mexfunction7.o
mexfunction8.o
mexfunction9.o
mexfunction10.o
mexfunction11.o
mexfunction12.o
mexfunction13.o
to create a shared executable
shared archive loaded
Linking generic_gateway
Interface 0 generic_gateway
[p,q,r]=mexfunction1(1:4,'qwerty');
Warning:
This function requires 2 inputs
if r~='qwerty' then bugmes();quit;end
[a,x]=mexfunction2(20,'x');
if a~=20 then bugmes();quit;end
A=rand(2,2);B=rand(2,3);
C=mexfunction3(A,B);
if norm(A*B-C) > %eps then bugmes();quit;end
p=mexfunction4(1:3,'x');
if p ~= poly(1:3,'x') then bugmes();quit;end
w1=mexfunction5(1:5);
if and(w1~=(1:5)) then bugmes();quit;end
w2=mexfunction6(1:5);
if and(w2~=(1:5)) then bugmes();quit;end
w=rand(2,3);w(10,15)=0;w=sparse(w);
mexfunction7(mtlb_sparse(w));
(1 , 1) = 0.560849
(2 , 1) = 0.662357
(1 , 2) = 0.726351
(2 , 2) = 0.198514
(1 , 3) = 0.544257
(2 , 3) = 0.232075
w=mexfunction8();
Rows 3; Columns 10
if w(1)~='123456789 ' then bugmes();quit;end
mexfunction9() // prints something calling disp
A=[1,2;3,4]
clear myvar;
A=mexfunction10() // search myvar
A =
variable myvar not found
if A<>"variable myvar not found" then bugmes();quit;end
myvar=1:45;
A=mexfunction10() // search myvar again
A =
variable myvar found size=[1,45]
if A<>"variable myvar found size=[1,45]" then bugmes();quit;end
mexfunction11() // creates A11 with a mexEvalString
if A11<>[1,2,3,4] then bugmes();quit;end
mexfunction12() // creates C with a WriteMatrix (<==> mxPutArray)
if C<>matrix(0:7,4,2) then bugmes();quit;end
mexfunction13() // creates X with a mexEvalString
ans =
variable X found size=[1,3]
// then try to get it with mexGetArray
if X<>[1,2,3] then bugmes();quit;end
|