[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
List question
From: |
Teemu Ikonen |
Subject: |
List question |
Date: |
Mon, 11 Sep 2000 15:06:21 +0300 (EET DST) |
Is list-element subindexing implemented in Octave 2.1?
In matlab the following works:
>> l = {ones(2,2), zeros(2,2), hilb(2)}
l =
[2x2 double] [2x2 double] [2x2 double]
>> l{3}(1,2)
ans =
0.5000
The same in octave fails:
octave:9> l = {ones(2,2), zeros(2,2), hilb(2)}
l =
[1,1] =
1 1
1 1
[1,2] =
0 0
0 0
[1,3] =
1.00000 0.50000
0.50000 0.33333
octave:10> l{3}(1,2)
error: invalid column index = 2
Any plans of fixing this? Of course I could copy the matrix to a temp
variable and then access the matrix element but that's really
unelegant...
Teemu
-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.che.wisc.edu/octave/octave.html
How to fund new projects: http://www.che.wisc.edu/octave/funding.html
Subscription information: http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------