1
//Test inputs for ex17f:
3
//...and 3 examples of Scilab argument functions:
4
deff('z=f1(x,y)','z=x+y');
5
deff('z=f2(x,y)','z=x*x+y*y');
6
deff('z=f3(x,y)','z=cos(x+y)');
8
//reference values for Z calculated by feval
13
// Calling ex17f with a argument function which is a Scilab function:
15
if norm(Z1-Zref1) > %eps then pause,end
18
if norm(Z2-Zref2) > %eps then pause,end
21
if norm(Z3-Zref3) > %eps then pause,end
23
// Calling ex17f with a argument function which is a Fortran function:
24
Z1=ex17f(X,Y,'f1f'); // f1f defined in ex17f.f
25
if norm(Z1 - Zref1) > %eps then pause,end
27
Z2=ex17f(X,Y,'f2f'); // f2f defined in ex17f.f
28
if norm(Z2 - Zref2) > %eps then pause,end
30
// making f3f.o and linking f3f dynamically with Scilab
31
if ~c_link('f3f') then
32
files=G_make(['f3f.o'],'f3f.dll');
33
link(files,'f3f','f') ;
36
// Calling ex17f with the Fortran argument function fp3
38
if norm(Z3 - Zref3) > %eps then pause,end