help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie questions


From: Gabor Zoltan Csejtey
Subject: Re: Newbie questions
Date: Thu, 15 Feb 2001 16:10:47 +0100 (MET)

I got a helpful hint from Paul Kienzle, look at the end of this letter.

With a list I can do:

a=list([1,2;3,4],[1;2]);
b=list([1,3;2,4],[3;2;4]);
c=list(a,b);

nth(c,1)(1)
ans =
(
  [1] =

    1  2
    3  4

)

and

nth(nth(c,1)(1),1)(1,2)
ans = 2

Gabor

Date: Thu, 15 Feb 2001 07:55:40 +0000
To: Gabor Zoltan Csejtey <address@hidden>
Subject: Re: Newbie questions

On Thu, Feb 15, 2001 at 01:39:54PM +0100, Gabor Zoltan Csejtey wrote:
<snip>

> How can I get the elements of a(1)?

You can't.  Cell arrays haven't been fully implemented.  

You could use lists, which are equivalent but different:

 a=list([1,2;3,4],[1;2]);
 nth(a,1)

Paul Kienzle
address@hidden

> 



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]