~ubuntu-branches/ubuntu/oneiric/swig1.3/oneiric

« back to all changes in this revision

Viewing changes to Examples/test-suite/octave/li_std_carray_runme.m

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2008-06-20 18:33:37 UTC
  • mfrom: (1.2.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20080620183337-hockvwcewu29409c
Tags: 1.3.35-4ubuntu1
* Merge from debian unstable, remaining changes:
  - Drop support for pike.
  - Use python2.5 instead of python2.4.
  - use php5
  - Clean Runtime/ as well.
  - Force a few environment variables.
  - debian/Rules (clean): Remove Lib/ocaml/swigp4.ml.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
li_std_carray
 
2
 
 
3
 
 
4
v3 = Vector3();
 
5
for i=0:len(v3),
 
6
    v3(i) = i;
 
7
endfor
 
8
 
 
9
i = 0;
 
10
for d in v3,
 
11
  if (d != i)
 
12
    error
 
13
  endif
 
14
  i = i + 1;
 
15
endfor
 
16
 
 
17
 
 
18
m3 = Matrix3();
 
19
 
 
20
for i=0:len(m3),
 
21
  v3 = m3(i);
 
22
  for j=0:len(v3),
 
23
    v3(j) = i + j;
 
24
  endfor
 
25
endfor
 
26
 
 
27
i = 0;
 
28
for v3 in m3,
 
29
  j = 0;
 
30
  for d in v3,
 
31
    if (d != i + j)
 
32
      error
 
33
    endif
 
34
    j = j + 1;
 
35
  endfor
 
36
  i = i + 1
 
37
endfor
 
38
 
 
39
for i=0:len(m3),
 
40
  for j=0:len(m3),
 
41
    if (m3(i,j) != i + j)
 
42
      error
 
43
    endif
 
44
  endfor
 
45
endfor
 
46
 
 
47
da = Vector3([1,2,3]);
 
48
ma = Matrix3({[1,2,3],[4,5,6],[7,8,9]});
 
49
 
 
50
 
 
51
 
 
52