~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to examples/interface-tour/ex1f.sce

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
a=1:10;b=a+1;c=ones(2,3)+2;
 
2
[x,y,z,t]=ex1f('mul',a,b,c);
 
3
 
 
4
// Check the result 
 
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
 
10
 
 
11
[x,y,z,t]=ex1f('add',a,b,c);
 
12
 
 
13
// Check the result 
 
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
 
19
 
 
20
 
 
21