help-octave
[Top][All Lists]
Advanced

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

Re: Accessing information returned from 'dir'


From: Etienne Grossmann
Subject: Re: Accessing information returned from 'dir'
Date: Wed, 6 Oct 2004 12:11:59 -0400
User-agent: Mutt/1.4.2.1i

  Hi once more.

  But, it the following normal? Or is my mind trapped in the good ol'
days of lists?

    octave:3> foo = cell(3,4); bar = foo{:,1}; typeinfo (foo)
    ans = cell

    octave:4> typeinfo (bar)

    *** typeinfo:

    - Built-in Function:  typeinfo (EXPR)
    Return the type of the expression EXPR, as a string.  If EXPR  is
    omitted, return an array of strings containing all the currently
    installed data types.
 
 |:-| ????

   Cheese,

   Etienne
 
octave:4> bar{1}
error: can't perform indexing operations for cs-list type


On Wed, Oct 06, 2004 at 03:48:43PM +0200, address@hidden wrote:
# 
# > It should work if you put the index before the structure element:
# > a(1).name
# 
# Yes, that worked allright, as did Etienne's suggestion. Many thanks to you
# both. It was the way a.name itself was printed that had me thinking it was
# accessed as a.(name(1)) where the outer braces denote grouping, not
# indexing. The help file seemed to confirm this, as it is designated as a
# 'structure array' which I carelessly interpreted as 'structure of array'
# instead of 'array of structure'.
# 
# 
# Kind regards,
# Maarten
# 
# 
# 
# -------------------------------------------------------------
# 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
# -------------------------------------------------------------
# 

-- 
Etienne Grossmann ------ http://www.cs.uky.edu/~etienne



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