From bug-request at octave dot org Wed Nov 24 21:17:03 2004 Subject: structure arrays From: Paul Probert To: bug-octave at bevo dot che dot wisc dot edu Date: Wed, 24 Nov 2004 19:57:30 -0600 Folks: I'm having trouble trying to make structure arrays. Under Octave 2.1.50 on Windows I can do this: >> x(1).item='some string'; >> x(1).data=[1,2,3]; >> x(2).item='another string'; >> x(2).data=[5,6,7,8]; >> x(1).item ans = some string >> x(2).data ans = 5 6 7 8 As we want. This is also what Matlab 6 does. But on octave 2.1.59 on Linux, I get this: octave:6> x(1).item='some string'; octave:7> x(1).data=[1,2,3]; octave:8> x(2).item='another string'; octave:9> x(2).data=[5,6,7,8]; octave:10> octave:11> x.item ans = (, [1] = some string [2] = another string ,) octave:12> x(1).item error: string cannot be indexed with . octave:12> x(2).data error: matrix cannot be indexed with . I built octave on Linux (SuSE 8.2) using the enable-shared and enable-dl options. Thanks in advance. I love Octave, btw. Having DASPK in Octave saved my butt a few weeks ago. Thanks for that, too. Paul Probert University of Wisconsin Electrical Engineering Dept. ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------