1
a=1:10;b=a+1;c=ones(2,3)+2;
2
[x,y,z,t]=ex1f('mul',a,b,c);
5
if norm(t-(a*2)) > %eps then pause,end
6
if norm(z-(b*2) ) > %eps then pause,end
7
if norm(y-(c*2)) > %eps then pause,end
8
deff('[y]=f(i,j)','y=i+j');
9
if norm(x- ( y.* feval(1:2,1:3,f))) > %eps then pause,end
11
[x,y,z,t]=ex1f('add',a,b,c);
14
if norm(t-(a+2)) > %eps then pause,end
15
if norm(z-(b+2) ) > %eps then pause,end
16
if norm(y-(c+2)) > %eps then pause,end
17
deff('[y]=f(i,j)','y=i+j');
18
if norm(x- ( c +2 + feval(1:2,1:3,f))) > %eps then pause,end